@tesouro/embedded-components-react 0.4.26 → 0.4.27
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/dist/experimental/RemoteCheckCapture.d.ts +741 -0
- package/dist/experimental/RemoteCheckCapture.js +3 -0
- package/dist/experimental/index.d.ts +740 -1
- package/dist/experimental/index.js +3 -0
- package/dist/index.css +3 -0
- package/dist/index.d.ts +75 -1
- package/dist/index.js +38 -38
- package/dist/lib/WidgetProvider.d.ts +22 -1
- package/dist/lib/WidgetProvider.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/remote-check-capture/data-access/dist/index.js +4 -0
- package/dist/libs/tesouro-embedded-components-react/remote-check-capture/data-access/dist/index2.js +28 -0
- package/dist/libs/tesouro-embedded-components-react/remote-check-capture/data-access/dist/index3.js +53 -0
- package/dist/libs/tesouro-embedded-components-react/remote-check-capture/data-access/dist/index4.js +55 -0
- package/dist/libs/tesouro-embedded-components-react/remote-check-capture/data-access/dist/index5.js +60 -0
- package/dist/libs/tesouro-embedded-components-react/remote-check-capture/feature/dist/index.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/remote-check-capture/feature/dist/lib/RemoteCheckCaptureWidget/RemoteCheckCaptureWidget.js +81 -0
- package/dist/libs/tesouro-embedded-components-react/remote-check-capture/feature/dist/lib/RemoteCheckCaptureWidget/permissions.js +15 -0
- package/dist/libs/tesouro-embedded-components-react/remote-check-capture/feature/dist/lib/RemoteCheckCaptureWidget/testIds.js +32 -0
- package/dist/libs/tesouro-embedded-components-react/remote-check-capture/feature/dist/lib/RemoteCheckCaptureWidget/useRemoteCheckCaptureWidget.js +270 -0
- package/dist/libs/tesouro-embedded-components-react/remote-check-capture/feature/dist/lib/analytics/events.js +7 -0
- package/dist/libs/tesouro-embedded-components-react/remote-check-capture/ui/dist/index.js +9 -0
- package/dist/libs/tesouro-embedded-components-react/remote-check-capture/ui/dist/index10.js +70 -0
- package/dist/libs/tesouro-embedded-components-react/remote-check-capture/ui/dist/index2.js +20 -0
- package/dist/libs/tesouro-embedded-components-react/remote-check-capture/ui/dist/index3.js +31 -0
- package/dist/libs/tesouro-embedded-components-react/remote-check-capture/ui/dist/index4.js +244 -0
- package/dist/libs/tesouro-embedded-components-react/remote-check-capture/ui/dist/index5.js +11 -0
- package/dist/libs/tesouro-embedded-components-react/remote-check-capture/ui/dist/index6.js +156 -0
- package/dist/libs/tesouro-embedded-components-react/remote-check-capture/ui/dist/index7.js +22 -0
- package/dist/libs/tesouro-embedded-components-react/remote-check-capture/ui/dist/index8.js +159 -0
- package/dist/libs/tesouro-embedded-components-react/remote-check-capture/ui/dist/index9.js +11 -0
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/helpers.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +25 -25
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js +190 -183
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +156 -144
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/transportInterceptors.js +16 -3
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/util/dist/lib/formatMoneyExact.js +6 -6
- package/package.json +1 -1
package/dist/index.css
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1215,6 +1215,27 @@ declare function useOwnWidgetConfig(): WidgetConfigInput | null;
|
|
|
1215
1215
|
* not passed `disclosuresAcceptance`.
|
|
1216
1216
|
*/
|
|
1217
1217
|
declare function useDisclosuresAcceptanceSurface(): ReactNode | undefined;
|
|
1218
|
+
/**
|
|
1219
|
+
* Is the still-visible `initResponse` one produced under a *different* widget
|
|
1220
|
+
* token than the active one — i.e. is a token-only refresh in flight?
|
|
1221
|
+
*
|
|
1222
|
+
* While this is true the init-derived `organizationId` default is deliberately
|
|
1223
|
+
* withheld (a stale init org must never scope a request carrying the new
|
|
1224
|
+
* token), so `useWidgetConfig().organizationId` reads `undefined` for a host
|
|
1225
|
+
* that supplies no explicit org. That is a *timing* gap, not the org changing.
|
|
1226
|
+
*
|
|
1227
|
+
* Read this before treating a missing org as "no org": it lets a consumer
|
|
1228
|
+
* distinguish the refresh window from a genuinely unscoped widget, and hold its
|
|
1229
|
+
* last known org rather than tearing its subtree down every time the host
|
|
1230
|
+
* rotates a token (EMBD-4823). Callers that simply disable a query while the org
|
|
1231
|
+
* is missing need not consult it — the suppression is already doing its job.
|
|
1232
|
+
*
|
|
1233
|
+
* @returns `true` while a replacement init is in flight for a rotated token;
|
|
1234
|
+
* `false` outside a provider, and once the new init settles.
|
|
1235
|
+
*
|
|
1236
|
+
* @see {@link useWidgetConfig} for the resolved config whose org this suppresses
|
|
1237
|
+
*/
|
|
1238
|
+
declare function useWidgetInitStaleForToken(): boolean;
|
|
1218
1239
|
/**
|
|
1219
1240
|
* Returns a stable callback that re-triggers the widget-init fetch at the
|
|
1220
1241
|
* **nearest provider level that owns a fetch**.
|
|
@@ -4582,21 +4603,53 @@ interface CheckAmountAndDetailScreenLabels {
|
|
|
4582
4603
|
title: string;
|
|
4583
4604
|
backButton: string;
|
|
4584
4605
|
customerLabel: string;
|
|
4606
|
+
customerPlaceholder: string;
|
|
4607
|
+
customerNoneOption: string;
|
|
4608
|
+
clearCustomer: string;
|
|
4609
|
+
customerLoadErrorMessage: string;
|
|
4585
4610
|
invoiceLabel: string;
|
|
4586
4611
|
invoicePlaceholder: string;
|
|
4587
4612
|
invoiceNoneOption: string;
|
|
4588
4613
|
clearInvoice: string;
|
|
4614
|
+
invoiceLoadErrorMessage: string;
|
|
4615
|
+
accountLabel: string;
|
|
4616
|
+
accountPlaceholder: string;
|
|
4617
|
+
accountDeterminedByInvoicePlaceholder: string;
|
|
4618
|
+
accountLoadErrorMessage: string;
|
|
4589
4619
|
checkAmountLabel: string;
|
|
4590
4620
|
currencyPrefix: string;
|
|
4621
|
+
/**
|
|
4622
|
+
* Contains the literal placeholder `{currencySymbol}` wherever a currency
|
|
4623
|
+
* symbol belongs — the feature layer substitutes it with the active
|
|
4624
|
+
* currency's own symbol (via `currencySymbolFor`), the same one shown by
|
|
4625
|
+
* `currencyPrefix`. This flow accepts more than USD, so a plain hardcoded
|
|
4626
|
+
* "$" would be wrong for a EUR/JPY/BHD invoice or account.
|
|
4627
|
+
*/
|
|
4628
|
+
amountLimitsHint: string;
|
|
4591
4629
|
continueButton: string;
|
|
4630
|
+
/** Shown instead of `continueButton` once both sides of the check are already captured. */
|
|
4631
|
+
continueToReviewButton: string;
|
|
4592
4632
|
collectPaymentButton: string;
|
|
4633
|
+
/** Toast shown when the entered amount can't be parsed. Currency-neutral: this flow also accepts EUR, JPY, BHD, etc. */
|
|
4634
|
+
invalidAmountErrorToast: string;
|
|
4635
|
+
/** Toast shown when no deposit account is available to submit against. */
|
|
4636
|
+
noDepositAccountErrorToast: string;
|
|
4637
|
+
/** Prefix before an invoice's due date in the invoice picker, e.g. "due Sep 1, 2026". */
|
|
4638
|
+
invoiceDueDatePrefix: string;
|
|
4639
|
+
/** Fallback account name shown when neither a fetched account nor an invoice's bank snapshot has one. */
|
|
4640
|
+
defaultAccountName: string;
|
|
4593
4641
|
}
|
|
4594
4642
|
|
|
4595
4643
|
interface CheckAmountAndDetailScreenTestIds {
|
|
4596
4644
|
backButton?: string;
|
|
4597
4645
|
customerSelect?: string;
|
|
4646
|
+
clearCustomerButton?: string;
|
|
4647
|
+
customerLoadError?: string;
|
|
4598
4648
|
invoiceSelect?: string;
|
|
4599
4649
|
clearInvoiceButton?: string;
|
|
4650
|
+
invoiceLoadError?: string;
|
|
4651
|
+
accountSelect?: string;
|
|
4652
|
+
accountLoadError?: string;
|
|
4600
4653
|
amountInput?: string;
|
|
4601
4654
|
continueButton?: string;
|
|
4602
4655
|
}
|
|
@@ -4606,10 +4659,31 @@ interface CheckAmountAndDetailScreenProps {
|
|
|
4606
4659
|
customerOptions: string[];
|
|
4607
4660
|
selectedCustomerIndex: number | null;
|
|
4608
4661
|
onCustomerSelect: (index: number) => void;
|
|
4662
|
+
onCustomerClear: () => void;
|
|
4663
|
+
/** True when the customer list failed to load — shows an inline error below the select. */
|
|
4664
|
+
customerLoadError?: boolean;
|
|
4665
|
+
/** Scoped by the caller to the selected customer's invoices. */
|
|
4609
4666
|
invoiceOptions: string[];
|
|
4610
4667
|
selectedInvoiceIndex: number | null;
|
|
4611
4668
|
onInvoiceSelect: (index: number) => void;
|
|
4612
4669
|
onInvoiceClear: () => void;
|
|
4670
|
+
/** No customer selected yet — a customer must be chosen before an invoice can be. */
|
|
4671
|
+
invoiceSelectDisabled?: boolean;
|
|
4672
|
+
/** True when the invoice list failed to load — shows an inline error below the select. */
|
|
4673
|
+
invoiceLoadError?: boolean;
|
|
4674
|
+
/** Display labels for the accounts the operator may deposit into. */
|
|
4675
|
+
accountOptions: string[];
|
|
4676
|
+
selectedAccountIndex: number | null;
|
|
4677
|
+
onAccountSelect: (index: number) => void;
|
|
4678
|
+
/**
|
|
4679
|
+
* True whenever a customer is engaged (selected, or an invoice pending under
|
|
4680
|
+
* it): the account is either not yet resolved or locked to the invoice's
|
|
4681
|
+
* account, and in neither case is it the operator's to change. Only with no
|
|
4682
|
+
* customer selected does the operator pick freely among their accounts.
|
|
4683
|
+
*/
|
|
4684
|
+
accountSelectDisabled?: boolean;
|
|
4685
|
+
/** True when the account list failed to load — shows an inline error below the select. */
|
|
4686
|
+
accountLoadError?: boolean;
|
|
4613
4687
|
amount: string;
|
|
4614
4688
|
onAmountChange: (value: string) => void;
|
|
4615
4689
|
amountSourceHint?: string;
|
|
@@ -4621,5 +4695,5 @@ interface CheckAmountAndDetailScreenProps {
|
|
|
4621
4695
|
|
|
4622
4696
|
type PendingFeatureStyleSources = CheckAmountAndDetailScreenProps | GapCoverageAlertProps | NoPolicyBannerProps;
|
|
4623
4697
|
|
|
4624
|
-
export { ACCEPT_DISCLOSURES_WIDGET_LABELS_EN, ADDITIONAL_OWNERS_LABELS_EN, AcceptDisclosuresWidget, BALANCES_WIDGET_LABELS_EN, BUSINESS_DETAILS_LABELS_EN, BalancesWidget, BankAccountOnboardingWidget, BankAccountsWidget, BillPayWidget, CardDetailsWidget, CounterpartsWidget, CreditCardsWidget, DebitCardsWidget, ERROR_STATE_ID, ExpenseApprovalPoliciesWidget, ExpenseManagementWidget, ExpenseRequirementsWidget, HELP_FAQ_EN, INSIGHTS_FEATURE_LABELS_EN, INSIGHTS_WIDGET_LABELS_EN, Implementation, InsightsWidget, ReceivablesWidgetMonite as InvoicingWidget, LinkedAccountsWidget, PERSONAL_DETAILS_LABELS_EN, ProductsWidget, RESULT_LABELS_EN, ReceiptMatchWidget, ReceivablesWidget, RefreshingRootWidgetProvider, RootWidgetProvider, SINGLE_INSIGHT_LABELS_EN, SettingsSection, SettingsWidget, DEFAULT_FEATURE_LABELS as TRANSFERS_FEATURE_LABELS_EN, TRANSFERS_WIDGET_LABELS_EN, TransfersWidget, UIFramework, UploadReceiptWidget, WIDGET_SUITE_DEFAULT_SECTIONS, WIDGET_SUITE_LABELS_EN, WidgetProvider, WidgetSuite, WidgetSuiteSectionId, WidgetTokenRefreshProvider, cloneEmbeddedClient, getGlobalWidgetConfig, getGlobalWidgetInitState, registerDesignSystemEnsurer, registerUIRenderers, setGlobalWidgetConfig, subscribeToGlobalWidgetInitState, updateGlobalWidgetConfig, useDisclosuresAcceptanceSurface, useOwnWidgetConfig, useRefetchWidget, useWidgetConfig, useWidgetError, useWidgetLoading, useWidgetToken };
|
|
4698
|
+
export { ACCEPT_DISCLOSURES_WIDGET_LABELS_EN, ADDITIONAL_OWNERS_LABELS_EN, AcceptDisclosuresWidget, BALANCES_WIDGET_LABELS_EN, BUSINESS_DETAILS_LABELS_EN, BalancesWidget, BankAccountOnboardingWidget, BankAccountsWidget, BillPayWidget, CardDetailsWidget, CounterpartsWidget, CreditCardsWidget, DebitCardsWidget, ERROR_STATE_ID, ExpenseApprovalPoliciesWidget, ExpenseManagementWidget, ExpenseRequirementsWidget, HELP_FAQ_EN, INSIGHTS_FEATURE_LABELS_EN, INSIGHTS_WIDGET_LABELS_EN, Implementation, InsightsWidget, ReceivablesWidgetMonite as InvoicingWidget, LinkedAccountsWidget, PERSONAL_DETAILS_LABELS_EN, ProductsWidget, RESULT_LABELS_EN, ReceiptMatchWidget, ReceivablesWidget, RefreshingRootWidgetProvider, RootWidgetProvider, SINGLE_INSIGHT_LABELS_EN, SettingsSection, SettingsWidget, DEFAULT_FEATURE_LABELS as TRANSFERS_FEATURE_LABELS_EN, TRANSFERS_WIDGET_LABELS_EN, TransfersWidget, UIFramework, UploadReceiptWidget, WIDGET_SUITE_DEFAULT_SECTIONS, WIDGET_SUITE_LABELS_EN, WidgetProvider, WidgetSuite, WidgetSuiteSectionId, WidgetTokenRefreshProvider, cloneEmbeddedClient, getGlobalWidgetConfig, getGlobalWidgetInitState, registerDesignSystemEnsurer, registerUIRenderers, setGlobalWidgetConfig, subscribeToGlobalWidgetInitState, updateGlobalWidgetConfig, useDisclosuresAcceptanceSurface, useOwnWidgetConfig, useRefetchWidget, useWidgetConfig, useWidgetError, useWidgetInitStaleForToken, useWidgetLoading, useWidgetToken };
|
|
4625
4699
|
export type { AcceptDisclosuresWidgetLabels, AcceptDisclosuresWidgetProps, Labels$3 as AccountDetailsWidgetLabels, ActivateCardPanelLabels, AdditionalOwner, AdditionalOwnersLabels, AddressFormSheetLabels, BalancesWidgetLabels, BalancesWidgetProps, BankAccountFormSheetLabels, BankAccountOnboardingWidgetLabels, BankAccountOnboardingWidgetProps, FeatureLabels$3 as BankAccountsWidgetFeatureLabels, Labels$4 as BankAccountsWidgetLabels, BankAccountsWidgetProps, BillPayWidgetProps, BusinessDetailsLabels, BusinessDetailsValues, CardDetailsFeatureLabels, CardDetailsPanelLabels as CardDetailsWidgetLabels, CardDetailsWidgetProps, CardsFeatureLabels, CardsListLabels as CardsLabels, CardsPagination, CompanyStructureValue, ConfirmDeleteDialogLabels, CounterpartDetailsSheetLabels, CounterpartFormSheetLabels, CounterpartMessageLabels, CounterpartMode, CounterpartsScreenLabels, CounterpartsWidgetProps, CreditCardsWidgetProps, DebitCardsWidgetProps, DisclosureLinks, EmbeddedClient, ExpenseApprovalPoliciesWidgetProps, Labels$1 as ExpenseManagementWidgetLabels, ExpenseManagementWidgetProps, ExpenseRequirementsWidgetProps, HelpFaqAnswer, HelpFaqBullet, HelpFaqBulletType, HelpFaqItem, HelpFaqSection, InsightsFeatureLabels, InsightsWidgetLabels, InsightsWidgetProps, ReceivablesWidgetMoniteProps as InvoicingWidgetProps, LinkComponent, LinkComponentProps, FeatureLabels as LinkedAccountsWidgetFeatureLabels, Labels as LinkedAccountsWidgetLabels, LinkedAccountsWidgetProps, MarketingWidgetContent, MeasureUnitDeleteDialogLabels, MeasureUnitsManagerLabels, PendingFeatureStyleSources, PersonalDetailsLabels, PersonalDetailsValues, ProductDeleteDialogLabels, ProductDetailsSheetLabels, ProductFormSheetLabels, ProductMessageLabels, ProductsScreenLabels, ProductsWidgetProps, ReceiptMatchSummary, ReceiptMatchWidgetProps, ReceivableActionDialogLabels, ReceivableDetailsSheetLabelOverrides, ReceivableDetailsSheetLabels, ReceivableDocumentType, ReceivableFormSheetLabels, ReceivableMessageLabels, ReceivablePaymentDialogLabels, ReceivableSendDialogLabels, ReceivableStatusBadgeLabels, ReceivablesScreenLabelOverrides, ReceivablesScreenLabels, ReceivablesWidgetProps, ReceivablesWidgetTab, RefreshingRootWidgetProviderProps, ResultLabels, RootWidgetProviderProps, SettingsWidgetAdditionalSection, FeatureLabels$2 as SettingsWidgetFeatureLabels, Labels$2 as SettingsWidgetLabels, SettingsWidgetProps, SettingsWidgetSection, SettingsWidgetSectionId, SingleInsightLabels, FeatureLabels$1 as TransfersWidgetFeatureLabels, TransfersWidgetLabels, TransfersWidgetProps, UploadReceiptWidgetProps, WidgetConfig, WidgetConfigInput, WidgetInitResponse, WidgetInitState, WidgetProviderLabels, WidgetProviderProps, WidgetSuiteCardsLabels, WidgetSuiteDashboardLabels, WidgetSuiteDisclosureLabels, WidgetSuiteExpensesLabels, WidgetSuiteLabelOverrides, WidgetSuiteLabels, WidgetSuiteMenuLabels, WidgetSuiteProps, WidgetSuiteSectionContentLabels, WidgetSuiteSectionTitleLabels, WidgetTokenFetcher, WidgetTokenManager, WidgetTokenRefreshProviderProps, WidgetTokenState };
|
package/dist/index.js
CHANGED
|
@@ -11,35 +11,35 @@ import { RootWidgetProvider as m } from "./libs/tesouro-embedded-components-reac
|
|
|
11
11
|
import { WidgetTokenRefreshProvider as h } from "./libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/WidgetTokenRefreshProvider.js";
|
|
12
12
|
import { useWidgetToken as g } from "./libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/useWidgetToken.js";
|
|
13
13
|
import { RefreshingRootWidgetProvider as _ } from "./libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/RefreshingRootWidgetProvider.js";
|
|
14
|
-
import { useDisclosuresAcceptanceSurface as v, useOwnWidgetConfig as y, useRefetchWidget as b, useWidgetConfig as x, useWidgetError as S,
|
|
15
|
-
import { BankAccountsWidget as
|
|
16
|
-
import { CounterpartsWidget as
|
|
17
|
-
import { BillPayWidget as
|
|
18
|
-
import { CardDetailsWidget as
|
|
19
|
-
import { CreditCardsWidget as
|
|
20
|
-
import { DebitCardsWidget as
|
|
21
|
-
import { BALANCES_WIDGET_LABELS_EN as
|
|
22
|
-
import { BalancesWidget as
|
|
23
|
-
import { INSIGHTS_FEATURE_LABELS_EN as
|
|
24
|
-
import { INSIGHTS_WIDGET_LABELS_EN as
|
|
25
|
-
import { SINGLE_INSIGHT_LABELS_EN as
|
|
26
|
-
import { InsightsWidget as
|
|
27
|
-
import { InvoicingWidget as
|
|
28
|
-
import { ReceivablesWidget as
|
|
29
|
-
import { SettingsSection as
|
|
30
|
-
import { ExpenseApprovalPoliciesWidget as
|
|
31
|
-
import { UploadReceiptWidget as
|
|
32
|
-
import { ExpenseRequirementsWidget as
|
|
33
|
-
import { ExpenseManagementWidget as
|
|
34
|
-
import { ReceiptMatchWidget as
|
|
35
|
-
import { HELP_FAQ_EN as
|
|
36
|
-
import { SettingsWidget as
|
|
37
|
-
import { DEFAULT_FEATURE_LABELS as
|
|
38
|
-
import { TRANSFERS_WIDGET_LABELS_EN as
|
|
39
|
-
import { TransfersWidget as
|
|
40
|
-
import { ACCEPT_DISCLOSURES_WIDGET_LABELS_EN as
|
|
41
|
-
import { AcceptDisclosuresWidget as
|
|
42
|
-
import { WidgetSuite as
|
|
14
|
+
import { useDisclosuresAcceptanceSurface as v, useOwnWidgetConfig as y, useRefetchWidget as b, useWidgetConfig as x, useWidgetError as S, useWidgetInitStaleForToken as C, useWidgetLoading as w } from "./libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
15
|
+
import { BankAccountsWidget as T } from "./libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/index8.js";
|
|
16
|
+
import { CounterpartsWidget as E } from "./libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/index8.js";
|
|
17
|
+
import { BillPayWidget as D } from "./libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index85.js";
|
|
18
|
+
import { CardDetailsWidget as O } from "./libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index13.js";
|
|
19
|
+
import { CreditCardsWidget as k } from "./libs/tesouro-embedded-components-react/cards-widget/feature/dist/index10.js";
|
|
20
|
+
import { DebitCardsWidget as A } from "./libs/tesouro-embedded-components-react/cards-widget/feature/dist/index11.js";
|
|
21
|
+
import { BALANCES_WIDGET_LABELS_EN as j } from "./libs/tesouro-embedded-components-react/balances-widget/ui/dist/lib/BalancesWidget/labels.js";
|
|
22
|
+
import { BalancesWidget as M } from "./libs/tesouro-embedded-components-react/balances-widget/feature/dist/index6.js";
|
|
23
|
+
import { INSIGHTS_FEATURE_LABELS_EN as N } from "./libs/tesouro-embedded-components-react/insights-widget/feature/dist/index3.js";
|
|
24
|
+
import { INSIGHTS_WIDGET_LABELS_EN as P } from "./libs/tesouro-embedded-components-react/insights-widget/ui/dist/lib/InsightsWidget/labels.js";
|
|
25
|
+
import { SINGLE_INSIGHT_LABELS_EN as F } from "./libs/tesouro-embedded-components-react/insights-widget/ui/dist/lib/InsightsWidget/SingleInsight/labels.js";
|
|
26
|
+
import { InsightsWidget as I } from "./libs/tesouro-embedded-components-react/insights-widget/feature/dist/index12.js";
|
|
27
|
+
import { InvoicingWidget as L } from "./libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index3.js";
|
|
28
|
+
import { ReceivablesWidget as R } from "./libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index12.js";
|
|
29
|
+
import { SettingsSection as z } from "./libs/tesouro-embedded-components-react/settings-widget/feature/dist/index4.js";
|
|
30
|
+
import { ExpenseApprovalPoliciesWidget as B } from "./libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index6.js";
|
|
31
|
+
import { UploadReceiptWidget as V } from "./libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index7.js";
|
|
32
|
+
import { ExpenseRequirementsWidget as H } from "./libs/tesouro-embedded-components-react/expense-requirements-widget/feature/dist/lib/ExpenseRequirementsWidget.js";
|
|
33
|
+
import { ExpenseManagementWidget as U } from "./libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index9.js";
|
|
34
|
+
import { ReceiptMatchWidget as W } from "./libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index13.js";
|
|
35
|
+
import { HELP_FAQ_EN as G } from "./libs/tesouro-embedded-components-react/help-widget/ui/contract/dist/index3.js";
|
|
36
|
+
import { SettingsWidget as K } from "./libs/tesouro-embedded-components-react/settings-widget/feature/dist/index6.js";
|
|
37
|
+
import { DEFAULT_FEATURE_LABELS as q } from "./libs/tesouro-embedded-components-react/transfers-widget/feature/dist/index3.js";
|
|
38
|
+
import { TRANSFERS_WIDGET_LABELS_EN as J } from "./libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransfersWidget/labels.js";
|
|
39
|
+
import { TransfersWidget as Y } from "./libs/tesouro-embedded-components-react/transfers-widget/feature/dist/index7.js";
|
|
40
|
+
import { ACCEPT_DISCLOSURES_WIDGET_LABELS_EN as X } from "./libs/tesouro-embedded-components-react/accept-disclosures-widget/ui/dist/lib/AcceptDisclosuresWidget/labels.js";
|
|
41
|
+
import { AcceptDisclosuresWidget as Z } from "./libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/index5.js";
|
|
42
|
+
import { WidgetSuite as Q } from "./libs/tesouro-embedded-components-react/widget-suite/feature/dist/index16.js";
|
|
43
43
|
import "./lib/WidgetSuite.js";
|
|
44
44
|
import "./lib/AcceptDisclosuresWidget.js";
|
|
45
45
|
import "./lib/BankAccountsWidget.js";
|
|
@@ -54,21 +54,21 @@ import "./lib/ExpenseRequirementsWidget.js";
|
|
|
54
54
|
import "./lib/BalancesWidget.js";
|
|
55
55
|
import "./lib/InsightsWidget.js";
|
|
56
56
|
import "./lib/InvoicingWidget.js";
|
|
57
|
-
import { LinkedAccountsWidget as
|
|
57
|
+
import { LinkedAccountsWidget as $ } from "./libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/index10.js";
|
|
58
58
|
import "./lib/LinkedAccountsWidget.js";
|
|
59
|
-
import { ADDITIONAL_OWNERS_LABELS_EN as
|
|
60
|
-
import { BUSINESS_DETAILS_LABELS_EN as
|
|
61
|
-
import { PERSONAL_DETAILS_LABELS_EN as
|
|
62
|
-
import { RESULT_LABELS_EN as
|
|
63
|
-
import { BankAccountOnboardingWidget as
|
|
59
|
+
import { ADDITIONAL_OWNERS_LABELS_EN as ee } from "./libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index4.js";
|
|
60
|
+
import { BUSINESS_DETAILS_LABELS_EN as te } from "./libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index6.js";
|
|
61
|
+
import { PERSONAL_DETAILS_LABELS_EN as ne } from "./libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index7.js";
|
|
62
|
+
import { RESULT_LABELS_EN as re } from "./libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index12.js";
|
|
63
|
+
import { BankAccountOnboardingWidget as ie } from "./libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index18.js";
|
|
64
64
|
import "./lib/BankAccountOnboardingWidget.js";
|
|
65
|
-
import { ProductsWidget as
|
|
65
|
+
import { ProductsWidget as ae } from "./libs/tesouro-embedded-components-react/products-widget/feature/dist/index8.js";
|
|
66
66
|
import "./lib/ProductsWidget.js";
|
|
67
67
|
import "./lib/ReceivablesWidget.js";
|
|
68
68
|
import "./lib/ReceiptMatchWidget.js";
|
|
69
69
|
import "./lib/SettingsWidget.js";
|
|
70
70
|
import "./lib/TransfersWidget.js";
|
|
71
71
|
import "./lib/UploadReceiptWidget.js";
|
|
72
|
-
import { WidgetProvider as
|
|
72
|
+
import { WidgetProvider as oe } from "./lib/WidgetProviderPublic.js";
|
|
73
73
|
import "./lib/WidgetProvider.js";
|
|
74
|
-
export {
|
|
74
|
+
export { X as ACCEPT_DISCLOSURES_WIDGET_LABELS_EN, ee as ADDITIONAL_OWNERS_LABELS_EN, Z as AcceptDisclosuresWidget, j as BALANCES_WIDGET_LABELS_EN, te as BUSINESS_DETAILS_LABELS_EN, M as BalancesWidget, ie as BankAccountOnboardingWidget, T as BankAccountsWidget, D as BillPayWidget, O as CardDetailsWidget, E as CounterpartsWidget, k as CreditCardsWidget, A as DebitCardsWidget, s as ERROR_STATE_ID, B as ExpenseApprovalPoliciesWidget, U as ExpenseManagementWidget, H as ExpenseRequirementsWidget, G as HELP_FAQ_EN, N as INSIGHTS_FEATURE_LABELS_EN, P as INSIGHTS_WIDGET_LABELS_EN, c as Implementation, I as InsightsWidget, L as InvoicingWidget, $ as LinkedAccountsWidget, ne as PERSONAL_DETAILS_LABELS_EN, ae as ProductsWidget, re as RESULT_LABELS_EN, W as ReceiptMatchWidget, R as ReceivablesWidget, _ as RefreshingRootWidgetProvider, m as RootWidgetProvider, F as SINGLE_INSIGHT_LABELS_EN, z as SettingsSection, K as SettingsWidget, q as TRANSFERS_FEATURE_LABELS_EN, J as TRANSFERS_WIDGET_LABELS_EN, Y as TransfersWidget, i as UIFramework, V as UploadReceiptWidget, t as WIDGET_SUITE_DEFAULT_SECTIONS, e as WIDGET_SUITE_LABELS_EN, oe as WidgetProvider, Q as WidgetSuite, n as WidgetSuiteSectionId, h as WidgetTokenRefreshProvider, r as cloneEmbeddedClient, l as getGlobalWidgetConfig, f as getGlobalWidgetInitState, a as registerDesignSystemEnsurer, o as registerUIRenderers, u as setGlobalWidgetConfig, p as subscribeToGlobalWidgetInitState, d as updateGlobalWidgetConfig, v as useDisclosuresAcceptanceSurface, y as useOwnWidgetConfig, b as useRefetchWidget, x as useWidgetConfig, S as useWidgetError, C as useWidgetInitStaleForToken, w as useWidgetLoading, g as useWidgetToken };
|
|
@@ -1143,6 +1143,27 @@ declare function useOwnWidgetConfig(): WidgetConfigInput | null;
|
|
|
1143
1143
|
* not passed `disclosuresAcceptance`.
|
|
1144
1144
|
*/
|
|
1145
1145
|
declare function useDisclosuresAcceptanceSurface(): ReactNode | undefined;
|
|
1146
|
+
/**
|
|
1147
|
+
* Is the still-visible `initResponse` one produced under a *different* widget
|
|
1148
|
+
* token than the active one — i.e. is a token-only refresh in flight?
|
|
1149
|
+
*
|
|
1150
|
+
* While this is true the init-derived `organizationId` default is deliberately
|
|
1151
|
+
* withheld (a stale init org must never scope a request carrying the new
|
|
1152
|
+
* token), so `useWidgetConfig().organizationId` reads `undefined` for a host
|
|
1153
|
+
* that supplies no explicit org. That is a *timing* gap, not the org changing.
|
|
1154
|
+
*
|
|
1155
|
+
* Read this before treating a missing org as "no org": it lets a consumer
|
|
1156
|
+
* distinguish the refresh window from a genuinely unscoped widget, and hold its
|
|
1157
|
+
* last known org rather than tearing its subtree down every time the host
|
|
1158
|
+
* rotates a token (EMBD-4823). Callers that simply disable a query while the org
|
|
1159
|
+
* is missing need not consult it — the suppression is already doing its job.
|
|
1160
|
+
*
|
|
1161
|
+
* @returns `true` while a replacement init is in flight for a rotated token;
|
|
1162
|
+
* `false` outside a provider, and once the new init settles.
|
|
1163
|
+
*
|
|
1164
|
+
* @see {@link useWidgetConfig} for the resolved config whose org this suppresses
|
|
1165
|
+
*/
|
|
1166
|
+
declare function useWidgetInitStaleForToken(): boolean;
|
|
1146
1167
|
/**
|
|
1147
1168
|
* Returns a stable callback that re-triggers the widget-init fetch at the
|
|
1148
1169
|
* **nearest provider level that owns a fetch**.
|
|
@@ -1282,5 +1303,5 @@ declare function useWidgetToken(): UseWidgetTokenResult;
|
|
|
1282
1303
|
*/
|
|
1283
1304
|
declare function WidgetProvider(props: PropsWithChildren<WidgetProviderProps>): ReactNode;
|
|
1284
1305
|
|
|
1285
|
-
export { ERROR_STATE_ID, Implementation, RefreshingRootWidgetProvider, RootWidgetProvider, UIFramework, WidgetProvider, WidgetTokenRefreshProvider, cloneEmbeddedClient, getGlobalWidgetConfig, getGlobalWidgetInitState, registerDesignSystemEnsurer, registerUIRenderers, setGlobalWidgetConfig, subscribeToGlobalWidgetInitState, updateGlobalWidgetConfig, useDisclosuresAcceptanceSurface, useOwnWidgetConfig, useRefetchWidget, useWidgetConfig, useWidgetError, useWidgetLoading, useWidgetToken };
|
|
1306
|
+
export { ERROR_STATE_ID, Implementation, RefreshingRootWidgetProvider, RootWidgetProvider, UIFramework, WidgetProvider, WidgetTokenRefreshProvider, cloneEmbeddedClient, getGlobalWidgetConfig, getGlobalWidgetInitState, registerDesignSystemEnsurer, registerUIRenderers, setGlobalWidgetConfig, subscribeToGlobalWidgetInitState, updateGlobalWidgetConfig, useDisclosuresAcceptanceSurface, useOwnWidgetConfig, useRefetchWidget, useWidgetConfig, useWidgetError, useWidgetInitStaleForToken, useWidgetLoading, useWidgetToken };
|
|
1286
1307
|
export type { EmbeddedClient, LinkComponent, LinkComponentProps, RefreshingRootWidgetProviderProps, RootWidgetProviderProps, WidgetConfig, WidgetConfigInput, WidgetInitResponse, WidgetInitState, WidgetProviderLabels, WidgetProviderProps, WidgetTokenFetcher, WidgetTokenManager, WidgetTokenRefreshProviderProps, WidgetTokenState };
|
|
@@ -10,7 +10,7 @@ import { RootWidgetProvider as d } from "../libs/tesouro-embedded-components-rea
|
|
|
10
10
|
import { WidgetTokenRefreshProvider as f } from "../libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/WidgetTokenRefreshProvider.js";
|
|
11
11
|
import { useWidgetToken as p } from "../libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/useWidgetToken.js";
|
|
12
12
|
import { RefreshingRootWidgetProvider as m } from "../libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/RefreshingRootWidgetProvider.js";
|
|
13
|
-
import { useDisclosuresAcceptanceSurface as h, useOwnWidgetConfig as g, useRefetchWidget as _, useWidgetConfig as v, useWidgetError as y,
|
|
13
|
+
import { useDisclosuresAcceptanceSurface as h, useOwnWidgetConfig as g, useRefetchWidget as _, useWidgetConfig as v, useWidgetError as y, useWidgetInitStaleForToken as b, useWidgetLoading as x } from "../libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
14
14
|
import "../libs/tesouro-embedded-components-react/shared/feature/dist/index.js";
|
|
15
|
-
import { WidgetProvider as
|
|
16
|
-
export { i as ERROR_STATE_ID, a as Implementation, m as RefreshingRootWidgetProvider, d as RootWidgetProvider, t as UIFramework,
|
|
15
|
+
import { WidgetProvider as S } from "./WidgetProviderPublic.js";
|
|
16
|
+
export { i as ERROR_STATE_ID, a as Implementation, m as RefreshingRootWidgetProvider, d as RootWidgetProvider, t as UIFramework, S as WidgetProvider, f as WidgetTokenRefreshProvider, e as cloneEmbeddedClient, o as getGlobalWidgetConfig, l as getGlobalWidgetInitState, n as registerDesignSystemEnsurer, r as registerUIRenderers, s as setGlobalWidgetConfig, u as subscribeToGlobalWidgetInitState, c as updateGlobalWidgetConfig, h as useDisclosuresAcceptanceSurface, g as useOwnWidgetConfig, _ as useRefetchWidget, v as useWidgetConfig, y as useWidgetError, b as useWidgetInitStaleForToken, x as useWidgetLoading, p as useWidgetToken };
|
package/dist/libs/tesouro-embedded-components-react/remote-check-capture/data-access/dist/index2.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { organizationHeaders as e } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
2
|
+
import { getBankAccountTransactionsQueryKey as t, getBankAccountsQueryKey as n, getReceivablesIdHistoryQueryKey as r, getReceivablesIdQueryKey as i, getReceivablesQueryKey as a } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
3
|
+
import "../../../shared/data-access/dist/index.js";
|
|
4
|
+
//#region ../../libs/tesouro-embedded-components-react/remote-check-capture/data-access/dist/index2.js
|
|
5
|
+
var o = ({ client: t, organizationId: r }) => n({
|
|
6
|
+
client: t,
|
|
7
|
+
headers: e(r)
|
|
8
|
+
}), s = ({ client: n, organizationId: r, bankAccountId: i }) => t({
|
|
9
|
+
client: n,
|
|
10
|
+
headers: e(r),
|
|
11
|
+
path: { id: i }
|
|
12
|
+
}), c = ({ client: t, organizationId: n }) => {
|
|
13
|
+
let [r] = a({
|
|
14
|
+
client: t,
|
|
15
|
+
headers: e(n)
|
|
16
|
+
}), i = { ...r };
|
|
17
|
+
return delete i.query, [i];
|
|
18
|
+
}, l = ({ client: t, organizationId: n, receivableId: r }) => i({
|
|
19
|
+
client: t,
|
|
20
|
+
headers: e(n),
|
|
21
|
+
path: { receivable_id: r }
|
|
22
|
+
}), u = ({ client: t, organizationId: n, receivableId: i }) => r({
|
|
23
|
+
client: t,
|
|
24
|
+
headers: e(n),
|
|
25
|
+
path: { receivable_id: i }
|
|
26
|
+
});
|
|
27
|
+
//#endregion
|
|
28
|
+
export { s as bankAccountTransactionsInvalidationKey, o as bankAccountsInvalidationKey, u as receivableHistoryInvalidationKey, l as receivableInvalidationKey, c as receivablesInvalidationKey };
|
package/dist/libs/tesouro-embedded-components-react/remote-check-capture/data-access/dist/index3.js
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { invalidateAllClients as e } from "../../../shared/data-access/dist/lib/clientRegistry.js";
|
|
6
|
+
import { useEmbedApi as t } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
7
|
+
import { organizationHeaders as n } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
8
|
+
import { createCheckDepositMutation as r } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
9
|
+
import "../../../shared/data-access/dist/index.js";
|
|
10
|
+
import { bankAccountTransactionsInvalidationKey as i, bankAccountsInvalidationKey as a, receivableHistoryInvalidationKey as o, receivableInvalidationKey as s, receivablesInvalidationKey as c } from "./index2.js";
|
|
11
|
+
import { useMutation as l } from "@tanstack/react-query";
|
|
12
|
+
//#region ../../libs/tesouro-embedded-components-react/remote-check-capture/data-access/dist/index3.js
|
|
13
|
+
function u() {
|
|
14
|
+
let { client: u, organizationId: d } = t(), f = n(d), p = r({
|
|
15
|
+
client: u,
|
|
16
|
+
headers: f
|
|
17
|
+
});
|
|
18
|
+
return l({
|
|
19
|
+
...p,
|
|
20
|
+
onSuccess: async (...t) => {
|
|
21
|
+
let [, n] = t;
|
|
22
|
+
await Promise.all([
|
|
23
|
+
e(a({
|
|
24
|
+
client: u,
|
|
25
|
+
organizationId: d
|
|
26
|
+
})),
|
|
27
|
+
e(i({
|
|
28
|
+
client: u,
|
|
29
|
+
organizationId: d,
|
|
30
|
+
bankAccountId: n.path.id
|
|
31
|
+
})),
|
|
32
|
+
...n.body.invoiceId ? [
|
|
33
|
+
e(c({
|
|
34
|
+
client: u,
|
|
35
|
+
organizationId: d
|
|
36
|
+
})),
|
|
37
|
+
e(s({
|
|
38
|
+
client: u,
|
|
39
|
+
organizationId: d,
|
|
40
|
+
receivableId: n.body.invoiceId
|
|
41
|
+
})),
|
|
42
|
+
e(o({
|
|
43
|
+
client: u,
|
|
44
|
+
organizationId: d,
|
|
45
|
+
receivableId: n.body.invoiceId
|
|
46
|
+
}))
|
|
47
|
+
] : []
|
|
48
|
+
]), await p.onSuccess?.(...t);
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
//#endregion
|
|
53
|
+
export { u as useCreateCheckDepositMutation };
|
package/dist/libs/tesouro-embedded-components-react/remote-check-capture/data-access/dist/index4.js
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { useEmbedApi as e } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
6
|
+
import { organizationHeaders as t } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
7
|
+
import { getCounterparts as n } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
|
|
8
|
+
import { getCounterpartsOptions as r } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
9
|
+
import { getAllPagesNextPaginationTokenParam as i, useAutoFetchNextPage as a } from "../../../shared/data-access/dist/lib/allPages.js";
|
|
10
|
+
import "../../../shared/data-access/dist/index.js";
|
|
11
|
+
import { hashKey as o, useInfiniteQuery as s } from "@tanstack/react-query";
|
|
12
|
+
//#region ../../libs/tesouro-embedded-components-react/remote-check-capture/data-access/dist/index4.js
|
|
13
|
+
var c = 100;
|
|
14
|
+
function l({ enabled: l } = {}) {
|
|
15
|
+
let { client: u, organizationId: d, widgetToken: f, authEpoch: p } = e(), m = t(d), h = !!(d && f) && (l === !0 || l === void 0), g = [...r({
|
|
16
|
+
client: u,
|
|
17
|
+
headers: m,
|
|
18
|
+
query: {
|
|
19
|
+
limit: c,
|
|
20
|
+
is_customer: !0
|
|
21
|
+
}
|
|
22
|
+
}).queryKey, "all"], _ = s({
|
|
23
|
+
queryKey: [...g, { authEpoch: p }],
|
|
24
|
+
enabled: h,
|
|
25
|
+
placeholderData: (e, t) => {
|
|
26
|
+
if (!t) return;
|
|
27
|
+
let n = t.queryKey.slice(0, -1);
|
|
28
|
+
return o(n) === o(g) ? e : void 0;
|
|
29
|
+
},
|
|
30
|
+
initialPageParam: void 0,
|
|
31
|
+
queryFn: async ({ signal: e, pageParam: t }) => {
|
|
32
|
+
let { data: r } = await n({
|
|
33
|
+
client: u,
|
|
34
|
+
headers: m,
|
|
35
|
+
query: {
|
|
36
|
+
limit: c,
|
|
37
|
+
is_customer: !0,
|
|
38
|
+
...t ? { pagination_token: t } : {}
|
|
39
|
+
},
|
|
40
|
+
signal: e,
|
|
41
|
+
throwOnError: !0
|
|
42
|
+
});
|
|
43
|
+
return r;
|
|
44
|
+
},
|
|
45
|
+
getNextPageParam: i
|
|
46
|
+
});
|
|
47
|
+
a(_, h);
|
|
48
|
+
let v = _.data?.pages.flatMap((e) => e.data ?? []) ?? [];
|
|
49
|
+
return {
|
|
50
|
+
..._,
|
|
51
|
+
customers: v
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
//#endregion
|
|
55
|
+
export { l as useCustomersQuery };
|
package/dist/libs/tesouro-embedded-components-react/remote-check-capture/data-access/dist/index5.js
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { useEmbedApi as e } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
6
|
+
import { organizationHeaders as t } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
7
|
+
import { getReceivables as n } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
|
|
8
|
+
import { getReceivablesOptions as r } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
9
|
+
import { getAllPagesNextPaginationTokenParam as i, useAutoFetchNextPage as a } from "../../../shared/data-access/dist/lib/allPages.js";
|
|
10
|
+
import "../../../shared/data-access/dist/index.js";
|
|
11
|
+
import { hashKey as o, useInfiniteQuery as s } from "@tanstack/react-query";
|
|
12
|
+
//#region ../../libs/tesouro-embedded-components-react/remote-check-capture/data-access/dist/index5.js
|
|
13
|
+
var c = 100, l = [
|
|
14
|
+
"issued",
|
|
15
|
+
"partially_paid",
|
|
16
|
+
"overdue"
|
|
17
|
+
];
|
|
18
|
+
function u({ counterpartId: u, enabled: d } = {}) {
|
|
19
|
+
let { client: f, organizationId: p, widgetToken: m, authEpoch: h } = e(), g = t(p), _ = !!(p && m && u) && (d === !0 || d === void 0), v = {
|
|
20
|
+
type: "invoice",
|
|
21
|
+
limit: c,
|
|
22
|
+
counterpart_id__in: u ? [u] : void 0,
|
|
23
|
+
status__in: [...l]
|
|
24
|
+
}, y = [...r({
|
|
25
|
+
client: f,
|
|
26
|
+
headers: g,
|
|
27
|
+
query: v
|
|
28
|
+
}).queryKey, "all"], b = s({
|
|
29
|
+
queryKey: [...y, { authEpoch: h }],
|
|
30
|
+
enabled: _,
|
|
31
|
+
placeholderData: (e, t) => {
|
|
32
|
+
if (!t) return;
|
|
33
|
+
let n = t.queryKey.slice(0, -1);
|
|
34
|
+
return o(n) === o(y) ? e : void 0;
|
|
35
|
+
},
|
|
36
|
+
initialPageParam: void 0,
|
|
37
|
+
queryFn: async ({ signal: e, pageParam: t }) => {
|
|
38
|
+
let { data: r } = await n({
|
|
39
|
+
client: f,
|
|
40
|
+
headers: g,
|
|
41
|
+
query: {
|
|
42
|
+
...v,
|
|
43
|
+
...t ? { pagination_token: t } : {}
|
|
44
|
+
},
|
|
45
|
+
signal: e,
|
|
46
|
+
throwOnError: !0
|
|
47
|
+
});
|
|
48
|
+
return r;
|
|
49
|
+
},
|
|
50
|
+
getNextPageParam: i
|
|
51
|
+
});
|
|
52
|
+
a(b, _);
|
|
53
|
+
let x = b.data?.pages.flatMap((e) => e.data.filter((e) => e.type === "invoice")) ?? [];
|
|
54
|
+
return {
|
|
55
|
+
...b,
|
|
56
|
+
invoices: x
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
//#endregion
|
|
60
|
+
export { u as useInvoicesQuery };
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { Button as e, Dialog as t, DialogContent as n, DialogTitle as r } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
|
+
import { EmbeddedToaster as i } from "../../../../../shared/ui/dist/lib/EmbeddedToaster.js";
|
|
7
|
+
import "../../../../../shared/ui/dist/index.js";
|
|
8
|
+
import { WidgetProvider as a } from "../../../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
|
|
9
|
+
import "../../../../../shared/feature/dist/index.js";
|
|
10
|
+
import { WIDGET_NAME as o } from "../analytics/events.js";
|
|
11
|
+
import { remoteCheckCaptureWidgetTestIds as s } from "./testIds.js";
|
|
12
|
+
import { CheckAmountAndDetailScreen as c } from "../../../../ui/dist/index4.js";
|
|
13
|
+
import { CheckCaptureScreen as l } from "../../../../ui/dist/index6.js";
|
|
14
|
+
import { ReviewDepositScreen as u } from "../../../../ui/dist/index8.js";
|
|
15
|
+
import { DepositCompleteScreen as d } from "../../../../ui/dist/index10.js";
|
|
16
|
+
import "../../../../ui/dist/index.js";
|
|
17
|
+
import { RemoteCheckCaptureFlowStep as f, useRemoteCheckCaptureWidget as p } from "./useRemoteCheckCaptureWidget.js";
|
|
18
|
+
import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
19
|
+
//#region ../../libs/tesouro-embedded-components-react/remote-check-capture/feature/dist/lib/RemoteCheckCaptureWidget/RemoteCheckCaptureWidget.js
|
|
20
|
+
var g = "ttw:flex ttw:h-[min(720px,90vh)] ttw:w-[min(390px,100%)] ttw:max-w-none ttw:flex-col ttw:overflow-hidden ttw:p-0", _ = "ttw:flex ttw:h-[min(390px,90vh)] ttw:w-[min(720px,100%)] ttw:max-w-none ttw:flex-col ttw:overflow-hidden ttw:p-0";
|
|
21
|
+
function v({ labels: a, onDepositComplete: o }) {
|
|
22
|
+
let { open: v, onOpenChange: y, onCollectPaymentClick: b, collectPaymentButtonLabel: x, canCollectDeposit: S, step: C, modalTitle: w, detailsScreenProps: T, captureScreenProps: E, reviewScreenProps: D, completeScreenProps: O } = p({
|
|
23
|
+
labels: a,
|
|
24
|
+
onDepositComplete: o
|
|
25
|
+
});
|
|
26
|
+
return /* @__PURE__ */ h("div", {
|
|
27
|
+
"data-testid": s.root,
|
|
28
|
+
children: [
|
|
29
|
+
/* @__PURE__ */ m(i, {}),
|
|
30
|
+
S ? /* @__PURE__ */ m(e, {
|
|
31
|
+
className: "ttw:h-12 ttw:rounded-xl ttw:px-8 ttw:text-base ttw:font-semibold",
|
|
32
|
+
"data-testid": s.collectPaymentButton,
|
|
33
|
+
onClick: b,
|
|
34
|
+
children: x
|
|
35
|
+
}) : null,
|
|
36
|
+
/* @__PURE__ */ m(t, {
|
|
37
|
+
open: v,
|
|
38
|
+
onOpenChange: y,
|
|
39
|
+
children: /* @__PURE__ */ h(n, {
|
|
40
|
+
className: C === f.Capture ? _ : g,
|
|
41
|
+
showCloseButton: !1,
|
|
42
|
+
"aria-describedby": void 0,
|
|
43
|
+
children: [
|
|
44
|
+
/* @__PURE__ */ m(r, {
|
|
45
|
+
className: "ttw:sr-only",
|
|
46
|
+
children: w
|
|
47
|
+
}),
|
|
48
|
+
C === f.Details ? /* @__PURE__ */ m(c, { ...T }) : null,
|
|
49
|
+
C === f.Capture && E ? /* @__PURE__ */ m(l, { ...E }) : null,
|
|
50
|
+
C === f.Review && D ? /* @__PURE__ */ m(u, { ...D }) : null,
|
|
51
|
+
C === f.Complete && O ? /* @__PURE__ */ m(d, { ...O }) : null
|
|
52
|
+
]
|
|
53
|
+
})
|
|
54
|
+
})
|
|
55
|
+
]
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
function y({ baseUrl: e, widgetToken: t, organizationId: n, configClient: r, gatewayRouting: i, linkComponent: s, implementation: c, uiFramework: l, errorFallback: u, onError: d, analytics: f, disclosuresAcceptance: p, providerLabels: h, labels: g, onDepositComplete: _ }) {
|
|
59
|
+
return /* @__PURE__ */ m(a, {
|
|
60
|
+
widgetName: o,
|
|
61
|
+
baseUrl: e,
|
|
62
|
+
widgetToken: t,
|
|
63
|
+
organizationId: n,
|
|
64
|
+
configClient: r,
|
|
65
|
+
gatewayRouting: i,
|
|
66
|
+
linkComponent: s,
|
|
67
|
+
implementation: c,
|
|
68
|
+
uiFramework: l,
|
|
69
|
+
errorFallback: u,
|
|
70
|
+
onError: d,
|
|
71
|
+
analytics: f,
|
|
72
|
+
disclosuresAcceptance: p,
|
|
73
|
+
providerLabels: h,
|
|
74
|
+
children: /* @__PURE__ */ m(v, {
|
|
75
|
+
labels: g,
|
|
76
|
+
onDepositComplete: _
|
|
77
|
+
})
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
//#endregion
|
|
81
|
+
export { y as RemoteCheckCaptureWidget, y as default };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Scope as e } from "../../../../../shared/data-access/dist/lib/scopes.js";
|
|
2
|
+
import "../../../../../shared/data-access/dist/index.js";
|
|
3
|
+
//#region ../../libs/tesouro-embedded-components-react/remote-check-capture/feature/dist/lib/RemoteCheckCaptureWidget/permissions.js
|
|
4
|
+
var t = [
|
|
5
|
+
e.BankAccountReadOrg,
|
|
6
|
+
e.CounterpartReadOrg,
|
|
7
|
+
e.InvoiceReadOrg,
|
|
8
|
+
e.CheckDepositWriteOrg
|
|
9
|
+
];
|
|
10
|
+
function n(e) {
|
|
11
|
+
let n = new Set(e ?? []);
|
|
12
|
+
return t.every((e) => n.has(e));
|
|
13
|
+
}
|
|
14
|
+
//#endregion
|
|
15
|
+
export { n as canCollectRemoteCheckDeposit };
|