@stripe/react-connect-js
Advanced tools
+39
-92
| /// <reference types="react" /> | ||
| import * as React from "react"; | ||
| import * as connectJs from "@stripe/connect-js"; | ||
| import { LoadError, LoaderStart, NotificationCount, InstallState, StepChange, IntervalType, ReportName, RecipientDataSource, PaymentsListDefaultFilters, ConnectElementTagName, ConnectHTMLElementRecord } from "@stripe/connect-js"; | ||
| type CollectionOptions = { | ||
| fields: "currently_due" | "eventually_due"; | ||
| futureRequirements?: "omit" | "include"; | ||
| }; | ||
| import { CollectionOptions, LoadError, LoaderStart, NotificationCount, StepChange, PaymentsListDefaultFilters, ConnectElementTagName, ConnectHTMLElementRecord } from "@stripe/connect-js"; | ||
| type FetchEphemeralKeyFunction = (fetchParams: { | ||
@@ -16,7 +13,2 @@ issuingCard: string; | ||
| }>; | ||
| type FinancingProductType = { | ||
| productType: "standard" | "refill" | "none"; | ||
| activeFinancingCount: number; | ||
| }; | ||
| type FinancingPromotionLayoutType = "full" | "banner"; | ||
| type CommonComponentProps = { | ||
@@ -26,21 +18,10 @@ onLoaderStart?: ({ elementTagName }: LoaderStart) => void; | ||
| }; | ||
| declare const ConnectAppInstall: ({ app, onAppInstallStateFetch, onAppInstallStateChange, onLoadError, onLoaderStart }: { | ||
| app: string; | ||
| onAppInstallStateFetch?: (({ appId, state }: InstallState) => void) | undefined; | ||
| onAppInstallStateChange?: (({ appId, state }: InstallState) => void) | undefined; | ||
| } & CommonComponentProps) => JSX.Element | null; | ||
| declare const ConnectAppViewport: ({ app, appData, onLoadError, onLoaderStart }: { | ||
| app: string; | ||
| appData?: Record<string, string> | undefined; | ||
| } & CommonComponentProps) => JSX.Element | null; | ||
| declare const ConnectBalances: ({ onLoadError, onLoaderStart }: CommonComponentProps) => JSX.Element; | ||
| declare const ConnectPayments: ({ defaultFilters, onLoadError, onLoaderStart }: { | ||
| defaultFilters?: PaymentsListDefaultFilters | undefined; | ||
| } & CommonComponentProps) => JSX.Element; | ||
| declare const ConnectPayouts: ({ onLoadError, onLoaderStart }: CommonComponentProps) => JSX.Element; | ||
| declare const ConnectPayoutsList: ({ onLoadError, onLoaderStart }: CommonComponentProps) => JSX.Element; | ||
| } & CommonComponentProps) => React.JSX.Element; | ||
| declare const ConnectPayouts: ({ onLoadError, onLoaderStart }: CommonComponentProps) => React.JSX.Element; | ||
| declare const ConnectPaymentDetails: ({ payment, onClose, onLoadError, onLoaderStart }: { | ||
| payment: string; | ||
| onClose: () => void; | ||
| } & CommonComponentProps) => JSX.Element | null; | ||
| } & CommonComponentProps) => React.JSX.Element | null; | ||
| declare const ConnectPaymentDisputes: ({ payment, onDisputesLoaded, onLoadError, onLoaderStart }: { | ||
@@ -51,4 +32,4 @@ payment: string; | ||
| }) => void) | undefined; | ||
| } & CommonComponentProps) => JSX.Element | null; | ||
| declare const ConnectDisputesList: ({ onLoadError, onLoaderStart }: CommonComponentProps) => JSX.Element | null; | ||
| } & CommonComponentProps) => React.JSX.Element | null; | ||
| declare const ConnectDisputesList: ({ onLoadError, onLoaderStart }: CommonComponentProps) => React.JSX.Element | null; | ||
| declare const ConnectAccountOnboarding: ({ onExit, recipientTermsOfServiceUrl, fullTermsOfServiceUrl, privacyPolicyUrl, skipTermsOfServiceCollection, collectionOptions, onLoadError, onLoaderStart, onStepChange }: { | ||
@@ -62,14 +43,10 @@ onExit: () => void; | ||
| collectionOptions?: CollectionOptions | undefined; | ||
| } & CommonComponentProps) => JSX.Element | null; | ||
| declare const ConnectPaymentMethodSettings: ({ paymentMethodConfiguration, onLoadError, onLoaderStart }: { | ||
| paymentMethodConfiguration?: string | undefined; | ||
| } & CommonComponentProps) => JSX.Element; | ||
| } & CommonComponentProps) => React.JSX.Element | null; | ||
| declare const ConnectAccountManagement: ({ collectionOptions, onLoadError, onLoaderStart }: { | ||
| collectionOptions?: CollectionOptions | undefined; | ||
| } & CommonComponentProps) => JSX.Element | null; | ||
| declare const ConnectInstantPayouts: ({ onLoadError, onLoaderStart }: CommonComponentProps) => JSX.Element; | ||
| } & CommonComponentProps) => React.JSX.Element | null; | ||
| declare const ConnectNotificationBanner: ({ collectionOptions, onNotificationsChange, onLoadError, onLoaderStart }: { | ||
| collectionOptions?: CollectionOptions | undefined; | ||
| onNotificationsChange?: (({ total, actionRequired }: NotificationCount) => void) | undefined; | ||
| } & CommonComponentProps) => JSX.Element | null; | ||
| } & CommonComponentProps) => React.JSX.Element | null; | ||
| declare const ConnectIssuingCard: ({ defaultCard, cardSwitching, showSpendControls, fetchEphemeralKey, onLoadError, onLoaderStart }: { | ||
@@ -80,3 +57,3 @@ defaultCard?: string | undefined; | ||
| fetchEphemeralKey?: FetchEphemeralKeyFunction | undefined; | ||
| } & CommonComponentProps) => JSX.Element; | ||
| } & CommonComponentProps) => React.JSX.Element; | ||
| declare const ConnectIssuingCardsList: ({ showSpendControls, issuingProgram, fetchEphemeralKey, onLoadError, onLoaderStart }: { | ||
@@ -86,45 +63,13 @@ showSpendControls?: boolean | undefined; | ||
| fetchEphemeralKey?: FetchEphemeralKeyFunction | undefined; | ||
| } & CommonComponentProps) => JSX.Element; | ||
| } & CommonComponentProps) => React.JSX.Element; | ||
| declare const ConnectFinancialAccount: ({ financialAccount, onLoadError, onLoaderStart }: { | ||
| financialAccount: string; | ||
| } & CommonComponentProps) => JSX.Element; | ||
| } & CommonComponentProps) => React.JSX.Element; | ||
| declare const ConnectFinancialAccountTransactions: ({ financialAccount, onLoadError, onLoaderStart }: { | ||
| financialAccount: string; | ||
| } & CommonComponentProps) => JSX.Element; | ||
| declare const ConnectRecipients: ({ dataSource, onLoadError, onLoaderStart }: { | ||
| dataSource: RecipientDataSource; | ||
| } & CommonComponentProps) => JSX.Element; | ||
| declare const ConnectCapitalOverview: ({ onLoadError, onLoaderStart }: CommonComponentProps) => JSX.Element; | ||
| declare const ConnectCapitalFinancing: ({ defaultFinancingOffer, showFinancingSelector, howCapitalWorksUrl, supportUrl, onFinancingsLoaded, onLoadError, onLoaderStart }: { | ||
| defaultFinancingOffer?: string | undefined; | ||
| showFinancingSelector?: boolean | undefined; | ||
| howCapitalWorksUrl?: string | undefined; | ||
| supportUrl?: string | undefined; | ||
| onFinancingsLoaded?: (({ total }: { | ||
| total: number; | ||
| }) => void) | undefined; | ||
| } & CommonComponentProps) => JSX.Element; | ||
| declare const ConnectCapitalFinancingApplication: ({ onApplicationSubmitted, onApplicationStepChange, privacyPolicyUrl, howCapitalWorksUrl, onLoadError, onLoaderStart }: { | ||
| onApplicationSubmitted: () => void; | ||
| onApplicationStepChange?: (({ step }: StepChange) => void) | undefined; | ||
| privacyPolicyUrl?: string | undefined; | ||
| howCapitalWorksUrl?: string | undefined; | ||
| } & CommonComponentProps) => JSX.Element; | ||
| declare const ConnectCapitalFinancingPromotion: ({ layout, onApplicationSubmitted, onEligibleFinancingOfferLoaded, onApplicationStepChange, privacyPolicyUrl, howCapitalWorksUrl, eligibilityCriteriaUrl, onLoadError, onLoaderStart }: { | ||
| layout?: FinancingPromotionLayoutType | undefined; | ||
| onEligibleFinancingOfferLoaded?: (({ productType, activeFinancingCount }: FinancingProductType) => void) | undefined; | ||
| privacyPolicyUrl?: string | undefined; | ||
| howCapitalWorksUrl?: string | undefined; | ||
| eligibilityCriteriaUrl?: string | undefined; | ||
| onApplicationSubmitted?: (() => void) | undefined; | ||
| onApplicationStepChange?: (({ step }: StepChange) => void) | undefined; | ||
| } & CommonComponentProps) => JSX.Element; | ||
| declare const ConnectDocuments: ({ onLoadError, onLoaderStart }: CommonComponentProps) => JSX.Element; | ||
| declare const ConnectProductTaxCodeSelector: ({ onLoadError, onLoaderStart, onTaxCodeSelect, hideDescription, disabled, initialTaxCode }: { | ||
| onTaxCodeSelect?: ((taxCode: string) => void) | undefined; | ||
| hideDescription?: boolean | undefined; | ||
| disabled?: boolean | undefined; | ||
| initialTaxCode?: string | undefined; | ||
| } & CommonComponentProps) => JSX.Element; | ||
| declare const ConnectTaxRegistrations: ({ onLoadError, onLoaderStart, displayCountries, onAfterTaxRegistrationAdded }: { | ||
| } & CommonComponentProps) => React.JSX.Element; | ||
| declare const ConnectDocuments: ({ onLoadError, onLoaderStart }: CommonComponentProps) => React.JSX.Element; | ||
| declare const ConnectPayoutsList: ({ onLoadError, onLoaderStart }: CommonComponentProps) => React.JSX.Element; | ||
| declare const ConnectBalances: ({ onLoadError, onLoaderStart }: CommonComponentProps) => React.JSX.Element; | ||
| declare const ConnectTaxRegistrations: ({ onLoadError, onLoaderStart, displayCountries, onAfterTaxRegistrationAdded, onAfterTaxRegistrationExpired }: { | ||
| displayCountries?: string[] | undefined; | ||
@@ -134,4 +79,6 @@ onAfterTaxRegistrationAdded?: (({ id }: { | ||
| }) => void) | undefined; | ||
| } & CommonComponentProps) => JSX.Element; | ||
| declare const ConnectExportTaxTransactions: ({ onLoadError, onLoaderStart }: CommonComponentProps) => JSX.Element; | ||
| onAfterTaxRegistrationExpired?: (({ id }: { | ||
| id: string; | ||
| }) => void) | undefined; | ||
| } & CommonComponentProps) => React.JSX.Element; | ||
| declare const ConnectTaxSettings: ({ onLoadError, onLoaderStart, hideProductTaxCodeSelector, displayHeadOfficeCountries, onTaxSettingsUpdated }: { | ||
@@ -143,12 +90,3 @@ hideProductTaxCodeSelector?: boolean | undefined; | ||
| }) => void) | undefined; | ||
| } & CommonComponentProps) => JSX.Element; | ||
| declare const ConnectTaxThresholdMonitoring: ({ onLoadError, onLoaderStart, displayCountries }: { | ||
| displayCountries?: string[] | undefined; | ||
| } & CommonComponentProps) => JSX.Element; | ||
| declare const ConnectReportingChart: ({ reportName, intervalStart, intervalEnd, intervalType, onLoadError, onLoaderStart }: { | ||
| reportName: ReportName; | ||
| intervalStart?: Date | undefined; | ||
| intervalEnd?: Date | undefined; | ||
| intervalType?: IntervalType | undefined; | ||
| } & CommonComponentProps) => JSX.Element | null; | ||
| } & CommonComponentProps) => React.JSX.Element; | ||
| declare const ConnectInstantPayoutsPromotion: ({ onInstantPayoutsPromotionLoaded, onInstantPayoutCreated, onLoadError, onLoaderStart }: { | ||
@@ -161,7 +99,13 @@ onInstantPayoutsPromotionLoaded?: (({ promotionShown }: { | ||
| }) => void) | undefined; | ||
| } & CommonComponentProps) => JSX.Element; | ||
| } & CommonComponentProps) => React.JSX.Element; | ||
| declare const ConnectPayoutDetails: ({ payout, onClose, onLoadError, onLoaderStart }: { | ||
| payout: string; | ||
| onClose: () => void; | ||
| } & CommonComponentProps) => JSX.Element | null; | ||
| } & CommonComponentProps) => React.JSX.Element | null; | ||
| declare const ConnectBalanceReport: ({ onLoadError, onLoaderStart }: CommonComponentProps) => React.JSX.Element; | ||
| declare const ConnectPayoutReconciliationReport: ({ onReportAvailabilityLoaded, onLoadError, onLoaderStart }: { | ||
| onReportAvailabilityLoaded?: (({ isReportAvailable }: { | ||
| isReportAvailable: boolean; | ||
| }) => void) | undefined; | ||
| } & CommonComponentProps) => React.JSX.Element; | ||
| type ConnectComponentsPayload = { | ||
@@ -173,6 +117,6 @@ connectInstance: connectJs.StripeConnectInstance; | ||
| children: any; | ||
| }) => JSX.Element; | ||
| }) => React.JSX.Element; | ||
| declare const useConnectComponents: () => ConnectComponentsPayload; | ||
| declare const useCreateComponent: <T extends ConnectElementTagName>(tagName: T) => { | ||
| wrapper: JSX.Element; | ||
| wrapper: React.JSX.Element; | ||
| component: ConnectHTMLElementRecord[T] | null; | ||
@@ -195,9 +139,12 @@ }; | ||
| declare const useAttachEvent: (component: HTMLElement | null, eventName: ConnectElementEventNames, listener: () => void) => void; | ||
| declare const useUpdateWithSetter: <T extends HTMLElement, V extends string | boolean | Date | PaymentsListDefaultFilters | Record<string, string> | string[] | CollectionOptions | FetchEphemeralKeyFunction | (() => void) | ((notificationCount: NotificationCount) => void) | ((loaderStart: LoaderStart) => void) | ((loaderError: LoadError) => void) | ((installState: InstallState) => void) | ((productType: FinancingProductType) => void) | ((StepChange: StepChange) => void) | (({ id }: { | ||
| declare const useUpdateWithSetter: <T extends HTMLElement, V extends string | boolean | string[] | CollectionOptions | PaymentsListDefaultFilters | FetchEphemeralKeyFunction | (() => void) | ((notificationCount: NotificationCount) => void) | ((loaderStart: LoaderStart) => void) | ((loaderError: LoadError) => void) | ((stepChange: StepChange) => void) | (({ id }: { | ||
| id: string; | ||
| }) => void) | ((taxCode: string) => void) | (({ promotionShown }: { | ||
| }) => void) | (({ promotionShown }: { | ||
| promotionShown: boolean; | ||
| }) => void) | (({ payoutId }: { | ||
| payoutId: string; | ||
| }) => void) | (({ isReportAvailable }: { | ||
| isReportAvailable: boolean; | ||
| }) => void) | undefined>(component: T | null, value: V, onUpdated: (component: T, value: V) => void) => void; | ||
| export { CommonComponentProps, ConnectAppInstall, ConnectAppViewport, ConnectBalances, ConnectPayments, ConnectPayouts, ConnectPayoutsList, ConnectPaymentDetails, ConnectPaymentDisputes, ConnectDisputesList, ConnectAccountOnboarding, ConnectPaymentMethodSettings, ConnectAccountManagement, ConnectInstantPayouts, ConnectNotificationBanner, ConnectIssuingCard, ConnectIssuingCardsList, ConnectFinancialAccount, ConnectFinancialAccountTransactions, ConnectRecipients, ConnectCapitalOverview, ConnectCapitalFinancing, ConnectCapitalFinancingApplication, ConnectCapitalFinancingPromotion, ConnectDocuments, ConnectProductTaxCodeSelector, ConnectTaxRegistrations, ConnectExportTaxTransactions, ConnectTaxSettings, ConnectTaxThresholdMonitoring, ConnectReportingChart, ConnectInstantPayoutsPromotion, ConnectPayoutDetails, ConnectComponentsProvider, useConnectComponents, useCreateComponent, useAttachAttribute, ConnectElementEventNames, useAttachEvent, useUpdateWithSetter }; | ||
| export type { CollectionOptions }; | ||
| export { CommonComponentProps, ConnectPayments, ConnectPayouts, ConnectPaymentDetails, ConnectPaymentDisputes, ConnectDisputesList, ConnectAccountOnboarding, ConnectAccountManagement, ConnectNotificationBanner, ConnectIssuingCard, ConnectIssuingCardsList, ConnectFinancialAccount, ConnectFinancialAccountTransactions, ConnectDocuments, ConnectPayoutsList, ConnectBalances, ConnectTaxRegistrations, ConnectTaxSettings, ConnectInstantPayoutsPromotion, ConnectPayoutDetails, ConnectBalanceReport, ConnectPayoutReconciliationReport, ConnectComponentsProvider, useConnectComponents, useCreateComponent, useAttachAttribute, ConnectElementEventNames, useAttachEvent, useUpdateWithSetter }; |
| /// <reference types="react" /> | ||
| import * as React from "react"; | ||
| import * as connectJs from "@stripe/connect-js"; | ||
| import { LoadError, LoaderStart, NotificationCount, InstallState, StepChange, IntervalType, ReportName, RecipientDataSource, PaymentsListDefaultFilters, ConnectElementTagName, ConnectHTMLElementRecord } from "@stripe/connect-js"; | ||
| type CollectionOptions = { | ||
| fields: "currently_due" | "eventually_due"; | ||
| futureRequirements?: "omit" | "include"; | ||
| }; | ||
| import { CollectionOptions, LoadError, LoaderStart, NotificationCount, StepChange, PaymentsListDefaultFilters, ConnectElementTagName, ConnectHTMLElementRecord } from "@stripe/connect-js"; | ||
| type FetchEphemeralKeyFunction = (fetchParams: { | ||
@@ -16,7 +13,2 @@ issuingCard: string; | ||
| }>; | ||
| type FinancingProductType = { | ||
| productType: "standard" | "refill" | "none"; | ||
| activeFinancingCount: number; | ||
| }; | ||
| type FinancingPromotionLayoutType = "full" | "banner"; | ||
| type CommonComponentProps = { | ||
@@ -26,21 +18,10 @@ onLoaderStart?: ({ elementTagName }: LoaderStart) => void; | ||
| }; | ||
| declare const ConnectAppInstall: ({ app, onAppInstallStateFetch, onAppInstallStateChange, onLoadError, onLoaderStart }: { | ||
| app: string; | ||
| onAppInstallStateFetch?: (({ appId, state }: InstallState) => void) | undefined; | ||
| onAppInstallStateChange?: (({ appId, state }: InstallState) => void) | undefined; | ||
| } & CommonComponentProps) => JSX.Element | null; | ||
| declare const ConnectAppViewport: ({ app, appData, onLoadError, onLoaderStart }: { | ||
| app: string; | ||
| appData?: Record<string, string> | undefined; | ||
| } & CommonComponentProps) => JSX.Element | null; | ||
| declare const ConnectBalances: ({ onLoadError, onLoaderStart }: CommonComponentProps) => JSX.Element; | ||
| declare const ConnectPayments: ({ defaultFilters, onLoadError, onLoaderStart }: { | ||
| defaultFilters?: PaymentsListDefaultFilters | undefined; | ||
| } & CommonComponentProps) => JSX.Element; | ||
| declare const ConnectPayouts: ({ onLoadError, onLoaderStart }: CommonComponentProps) => JSX.Element; | ||
| declare const ConnectPayoutsList: ({ onLoadError, onLoaderStart }: CommonComponentProps) => JSX.Element; | ||
| } & CommonComponentProps) => React.JSX.Element; | ||
| declare const ConnectPayouts: ({ onLoadError, onLoaderStart }: CommonComponentProps) => React.JSX.Element; | ||
| declare const ConnectPaymentDetails: ({ payment, onClose, onLoadError, onLoaderStart }: { | ||
| payment: string; | ||
| onClose: () => void; | ||
| } & CommonComponentProps) => JSX.Element | null; | ||
| } & CommonComponentProps) => React.JSX.Element | null; | ||
| declare const ConnectPaymentDisputes: ({ payment, onDisputesLoaded, onLoadError, onLoaderStart }: { | ||
@@ -51,4 +32,4 @@ payment: string; | ||
| }) => void) | undefined; | ||
| } & CommonComponentProps) => JSX.Element | null; | ||
| declare const ConnectDisputesList: ({ onLoadError, onLoaderStart }: CommonComponentProps) => JSX.Element | null; | ||
| } & CommonComponentProps) => React.JSX.Element | null; | ||
| declare const ConnectDisputesList: ({ onLoadError, onLoaderStart }: CommonComponentProps) => React.JSX.Element | null; | ||
| declare const ConnectAccountOnboarding: ({ onExit, recipientTermsOfServiceUrl, fullTermsOfServiceUrl, privacyPolicyUrl, skipTermsOfServiceCollection, collectionOptions, onLoadError, onLoaderStart, onStepChange }: { | ||
@@ -62,14 +43,10 @@ onExit: () => void; | ||
| collectionOptions?: CollectionOptions | undefined; | ||
| } & CommonComponentProps) => JSX.Element | null; | ||
| declare const ConnectPaymentMethodSettings: ({ paymentMethodConfiguration, onLoadError, onLoaderStart }: { | ||
| paymentMethodConfiguration?: string | undefined; | ||
| } & CommonComponentProps) => JSX.Element; | ||
| } & CommonComponentProps) => React.JSX.Element | null; | ||
| declare const ConnectAccountManagement: ({ collectionOptions, onLoadError, onLoaderStart }: { | ||
| collectionOptions?: CollectionOptions | undefined; | ||
| } & CommonComponentProps) => JSX.Element | null; | ||
| declare const ConnectInstantPayouts: ({ onLoadError, onLoaderStart }: CommonComponentProps) => JSX.Element; | ||
| } & CommonComponentProps) => React.JSX.Element | null; | ||
| declare const ConnectNotificationBanner: ({ collectionOptions, onNotificationsChange, onLoadError, onLoaderStart }: { | ||
| collectionOptions?: CollectionOptions | undefined; | ||
| onNotificationsChange?: (({ total, actionRequired }: NotificationCount) => void) | undefined; | ||
| } & CommonComponentProps) => JSX.Element | null; | ||
| } & CommonComponentProps) => React.JSX.Element | null; | ||
| declare const ConnectIssuingCard: ({ defaultCard, cardSwitching, showSpendControls, fetchEphemeralKey, onLoadError, onLoaderStart }: { | ||
@@ -80,3 +57,3 @@ defaultCard?: string | undefined; | ||
| fetchEphemeralKey?: FetchEphemeralKeyFunction | undefined; | ||
| } & CommonComponentProps) => JSX.Element; | ||
| } & CommonComponentProps) => React.JSX.Element; | ||
| declare const ConnectIssuingCardsList: ({ showSpendControls, issuingProgram, fetchEphemeralKey, onLoadError, onLoaderStart }: { | ||
@@ -86,45 +63,13 @@ showSpendControls?: boolean | undefined; | ||
| fetchEphemeralKey?: FetchEphemeralKeyFunction | undefined; | ||
| } & CommonComponentProps) => JSX.Element; | ||
| } & CommonComponentProps) => React.JSX.Element; | ||
| declare const ConnectFinancialAccount: ({ financialAccount, onLoadError, onLoaderStart }: { | ||
| financialAccount: string; | ||
| } & CommonComponentProps) => JSX.Element; | ||
| } & CommonComponentProps) => React.JSX.Element; | ||
| declare const ConnectFinancialAccountTransactions: ({ financialAccount, onLoadError, onLoaderStart }: { | ||
| financialAccount: string; | ||
| } & CommonComponentProps) => JSX.Element; | ||
| declare const ConnectRecipients: ({ dataSource, onLoadError, onLoaderStart }: { | ||
| dataSource: RecipientDataSource; | ||
| } & CommonComponentProps) => JSX.Element; | ||
| declare const ConnectCapitalOverview: ({ onLoadError, onLoaderStart }: CommonComponentProps) => JSX.Element; | ||
| declare const ConnectCapitalFinancing: ({ defaultFinancingOffer, showFinancingSelector, howCapitalWorksUrl, supportUrl, onFinancingsLoaded, onLoadError, onLoaderStart }: { | ||
| defaultFinancingOffer?: string | undefined; | ||
| showFinancingSelector?: boolean | undefined; | ||
| howCapitalWorksUrl?: string | undefined; | ||
| supportUrl?: string | undefined; | ||
| onFinancingsLoaded?: (({ total }: { | ||
| total: number; | ||
| }) => void) | undefined; | ||
| } & CommonComponentProps) => JSX.Element; | ||
| declare const ConnectCapitalFinancingApplication: ({ onApplicationSubmitted, onApplicationStepChange, privacyPolicyUrl, howCapitalWorksUrl, onLoadError, onLoaderStart }: { | ||
| onApplicationSubmitted: () => void; | ||
| onApplicationStepChange?: (({ step }: StepChange) => void) | undefined; | ||
| privacyPolicyUrl?: string | undefined; | ||
| howCapitalWorksUrl?: string | undefined; | ||
| } & CommonComponentProps) => JSX.Element; | ||
| declare const ConnectCapitalFinancingPromotion: ({ layout, onApplicationSubmitted, onEligibleFinancingOfferLoaded, onApplicationStepChange, privacyPolicyUrl, howCapitalWorksUrl, eligibilityCriteriaUrl, onLoadError, onLoaderStart }: { | ||
| layout?: FinancingPromotionLayoutType | undefined; | ||
| onEligibleFinancingOfferLoaded?: (({ productType, activeFinancingCount }: FinancingProductType) => void) | undefined; | ||
| privacyPolicyUrl?: string | undefined; | ||
| howCapitalWorksUrl?: string | undefined; | ||
| eligibilityCriteriaUrl?: string | undefined; | ||
| onApplicationSubmitted?: (() => void) | undefined; | ||
| onApplicationStepChange?: (({ step }: StepChange) => void) | undefined; | ||
| } & CommonComponentProps) => JSX.Element; | ||
| declare const ConnectDocuments: ({ onLoadError, onLoaderStart }: CommonComponentProps) => JSX.Element; | ||
| declare const ConnectProductTaxCodeSelector: ({ onLoadError, onLoaderStart, onTaxCodeSelect, hideDescription, disabled, initialTaxCode }: { | ||
| onTaxCodeSelect?: ((taxCode: string) => void) | undefined; | ||
| hideDescription?: boolean | undefined; | ||
| disabled?: boolean | undefined; | ||
| initialTaxCode?: string | undefined; | ||
| } & CommonComponentProps) => JSX.Element; | ||
| declare const ConnectTaxRegistrations: ({ onLoadError, onLoaderStart, displayCountries, onAfterTaxRegistrationAdded }: { | ||
| } & CommonComponentProps) => React.JSX.Element; | ||
| declare const ConnectDocuments: ({ onLoadError, onLoaderStart }: CommonComponentProps) => React.JSX.Element; | ||
| declare const ConnectPayoutsList: ({ onLoadError, onLoaderStart }: CommonComponentProps) => React.JSX.Element; | ||
| declare const ConnectBalances: ({ onLoadError, onLoaderStart }: CommonComponentProps) => React.JSX.Element; | ||
| declare const ConnectTaxRegistrations: ({ onLoadError, onLoaderStart, displayCountries, onAfterTaxRegistrationAdded, onAfterTaxRegistrationExpired }: { | ||
| displayCountries?: string[] | undefined; | ||
@@ -134,4 +79,6 @@ onAfterTaxRegistrationAdded?: (({ id }: { | ||
| }) => void) | undefined; | ||
| } & CommonComponentProps) => JSX.Element; | ||
| declare const ConnectExportTaxTransactions: ({ onLoadError, onLoaderStart }: CommonComponentProps) => JSX.Element; | ||
| onAfterTaxRegistrationExpired?: (({ id }: { | ||
| id: string; | ||
| }) => void) | undefined; | ||
| } & CommonComponentProps) => React.JSX.Element; | ||
| declare const ConnectTaxSettings: ({ onLoadError, onLoaderStart, hideProductTaxCodeSelector, displayHeadOfficeCountries, onTaxSettingsUpdated }: { | ||
@@ -143,12 +90,3 @@ hideProductTaxCodeSelector?: boolean | undefined; | ||
| }) => void) | undefined; | ||
| } & CommonComponentProps) => JSX.Element; | ||
| declare const ConnectTaxThresholdMonitoring: ({ onLoadError, onLoaderStart, displayCountries }: { | ||
| displayCountries?: string[] | undefined; | ||
| } & CommonComponentProps) => JSX.Element; | ||
| declare const ConnectReportingChart: ({ reportName, intervalStart, intervalEnd, intervalType, onLoadError, onLoaderStart }: { | ||
| reportName: ReportName; | ||
| intervalStart?: Date | undefined; | ||
| intervalEnd?: Date | undefined; | ||
| intervalType?: IntervalType | undefined; | ||
| } & CommonComponentProps) => JSX.Element | null; | ||
| } & CommonComponentProps) => React.JSX.Element; | ||
| declare const ConnectInstantPayoutsPromotion: ({ onInstantPayoutsPromotionLoaded, onInstantPayoutCreated, onLoadError, onLoaderStart }: { | ||
@@ -161,7 +99,13 @@ onInstantPayoutsPromotionLoaded?: (({ promotionShown }: { | ||
| }) => void) | undefined; | ||
| } & CommonComponentProps) => JSX.Element; | ||
| } & CommonComponentProps) => React.JSX.Element; | ||
| declare const ConnectPayoutDetails: ({ payout, onClose, onLoadError, onLoaderStart }: { | ||
| payout: string; | ||
| onClose: () => void; | ||
| } & CommonComponentProps) => JSX.Element | null; | ||
| } & CommonComponentProps) => React.JSX.Element | null; | ||
| declare const ConnectBalanceReport: ({ onLoadError, onLoaderStart }: CommonComponentProps) => React.JSX.Element; | ||
| declare const ConnectPayoutReconciliationReport: ({ onReportAvailabilityLoaded, onLoadError, onLoaderStart }: { | ||
| onReportAvailabilityLoaded?: (({ isReportAvailable }: { | ||
| isReportAvailable: boolean; | ||
| }) => void) | undefined; | ||
| } & CommonComponentProps) => React.JSX.Element; | ||
| type ConnectComponentsPayload = { | ||
@@ -173,6 +117,6 @@ connectInstance: connectJs.StripeConnectInstance; | ||
| children: any; | ||
| }) => JSX.Element; | ||
| }) => React.JSX.Element; | ||
| declare const useConnectComponents: () => ConnectComponentsPayload; | ||
| declare const useCreateComponent: <T extends ConnectElementTagName>(tagName: T) => { | ||
| wrapper: JSX.Element; | ||
| wrapper: React.JSX.Element; | ||
| component: ConnectHTMLElementRecord[T] | null; | ||
@@ -195,9 +139,12 @@ }; | ||
| declare const useAttachEvent: (component: HTMLElement | null, eventName: ConnectElementEventNames, listener: () => void) => void; | ||
| declare const useUpdateWithSetter: <T extends HTMLElement, V extends string | boolean | Date | PaymentsListDefaultFilters | Record<string, string> | string[] | CollectionOptions | FetchEphemeralKeyFunction | (() => void) | ((notificationCount: NotificationCount) => void) | ((loaderStart: LoaderStart) => void) | ((loaderError: LoadError) => void) | ((installState: InstallState) => void) | ((productType: FinancingProductType) => void) | ((StepChange: StepChange) => void) | (({ id }: { | ||
| declare const useUpdateWithSetter: <T extends HTMLElement, V extends string | boolean | string[] | CollectionOptions | PaymentsListDefaultFilters | FetchEphemeralKeyFunction | (() => void) | ((notificationCount: NotificationCount) => void) | ((loaderStart: LoaderStart) => void) | ((loaderError: LoadError) => void) | ((stepChange: StepChange) => void) | (({ id }: { | ||
| id: string; | ||
| }) => void) | ((taxCode: string) => void) | (({ promotionShown }: { | ||
| }) => void) | (({ promotionShown }: { | ||
| promotionShown: boolean; | ||
| }) => void) | (({ payoutId }: { | ||
| payoutId: string; | ||
| }) => void) | (({ isReportAvailable }: { | ||
| isReportAvailable: boolean; | ||
| }) => void) | undefined>(component: T | null, value: V, onUpdated: (component: T, value: V) => void) => void; | ||
| export { CommonComponentProps, ConnectAppInstall, ConnectAppViewport, ConnectBalances, ConnectPayments, ConnectPayouts, ConnectPayoutsList, ConnectPaymentDetails, ConnectPaymentDisputes, ConnectDisputesList, ConnectAccountOnboarding, ConnectPaymentMethodSettings, ConnectAccountManagement, ConnectInstantPayouts, ConnectNotificationBanner, ConnectIssuingCard, ConnectIssuingCardsList, ConnectFinancialAccount, ConnectFinancialAccountTransactions, ConnectRecipients, ConnectCapitalOverview, ConnectCapitalFinancing, ConnectCapitalFinancingApplication, ConnectCapitalFinancingPromotion, ConnectDocuments, ConnectProductTaxCodeSelector, ConnectTaxRegistrations, ConnectExportTaxTransactions, ConnectTaxSettings, ConnectTaxThresholdMonitoring, ConnectReportingChart, ConnectInstantPayoutsPromotion, ConnectPayoutDetails, ConnectComponentsProvider, useConnectComponents, useCreateComponent, useAttachAttribute, ConnectElementEventNames, useAttachEvent, useUpdateWithSetter }; | ||
| export type { CollectionOptions }; | ||
| export { CommonComponentProps, ConnectPayments, ConnectPayouts, ConnectPaymentDetails, ConnectPaymentDisputes, ConnectDisputesList, ConnectAccountOnboarding, ConnectAccountManagement, ConnectNotificationBanner, ConnectIssuingCard, ConnectIssuingCardsList, ConnectFinancialAccount, ConnectFinancialAccountTransactions, ConnectDocuments, ConnectPayoutsList, ConnectBalances, ConnectTaxRegistrations, ConnectTaxSettings, ConnectInstantPayoutsPromotion, ConnectPayoutDetails, ConnectBalanceReport, ConnectPayoutReconciliationReport, ConnectComponentsProvider, useConnectComponents, useCreateComponent, useAttachAttribute, ConnectElementEventNames, useAttachEvent, useUpdateWithSetter }; |
+206
-479
| import * as React from 'react'; | ||
| import React__default from 'react'; | ||
| function _arrayLikeToArray(r, a) { | ||
| (null == a || a > r.length) && (a = r.length); | ||
| for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; | ||
| return n; | ||
| } | ||
| function _arrayWithHoles(r) { | ||
| if (Array.isArray(r)) return r; | ||
| } | ||
| function _iterableToArrayLimit(r, l) { | ||
@@ -39,15 +31,24 @@ var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; | ||
| } | ||
| function _slicedToArray(arr, i) { | ||
| return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); | ||
| } | ||
| function _arrayWithHoles(arr) { | ||
| if (Array.isArray(arr)) return arr; | ||
| } | ||
| function _unsupportedIterableToArray(o, minLen) { | ||
| if (!o) return; | ||
| if (typeof o === "string") return _arrayLikeToArray(o, minLen); | ||
| var n = Object.prototype.toString.call(o).slice(8, -1); | ||
| if (n === "Object" && o.constructor) n = o.constructor.name; | ||
| if (n === "Map" || n === "Set") return Array.from(o); | ||
| if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); | ||
| } | ||
| function _arrayLikeToArray(arr, len) { | ||
| if (len == null || len > arr.length) len = arr.length; | ||
| for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; | ||
| return arr2; | ||
| } | ||
| function _nonIterableRest() { | ||
| throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | ||
| } | ||
| function _slicedToArray(r, e) { | ||
| return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); | ||
| } | ||
| function _unsupportedIterableToArray(r, a) { | ||
| if (r) { | ||
| if ("string" == typeof r) return _arrayLikeToArray(r, a); | ||
| var t = {}.toString.call(r).slice(8, -1); | ||
| return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; | ||
| } | ||
| } | ||
@@ -97,3 +98,3 @@ var ConnectComponentsContext = /*#__PURE__*/React.createContext(null); | ||
| try { | ||
| newComponent.setAttribute('reactSdkAnalytics', '3.3.36-preview-1'); | ||
| newComponent.setAttribute('reactSdkAnalytics', '3.3.36'); | ||
| } catch (e) { | ||
@@ -127,71 +128,9 @@ console.log('Error setting React Sdk version with error message: ', e); | ||
| var ConnectAppInstall = function ConnectAppInstall(_ref) { | ||
| var app = _ref.app, | ||
| onAppInstallStateFetch = _ref.onAppInstallStateFetch, | ||
| onAppInstallStateChange = _ref.onAppInstallStateChange, | ||
| var ConnectPayments = function ConnectPayments(_ref) { | ||
| var defaultFilters = _ref.defaultFilters, | ||
| onLoadError = _ref.onLoadError, | ||
| onLoaderStart = _ref.onLoaderStart; | ||
| var _useCreateComponent = useCreateComponent('app-install'), | ||
| var _useCreateComponent = useCreateComponent('payments'), | ||
| wrapper = _useCreateComponent.wrapper, | ||
| appInstall = _useCreateComponent.component; | ||
| useUpdateWithSetter(appInstall, app, function (comp, val) { | ||
| return comp.setApp(val); | ||
| }); | ||
| useUpdateWithSetter(appInstall, onAppInstallStateFetch, function (comp, val) { | ||
| return comp.setOnAppInstallStateFetched(val); | ||
| }); | ||
| useUpdateWithSetter(appInstall, onAppInstallStateChange, function (comp, val) { | ||
| return comp.setOnAppInstallStateChanged(val); | ||
| }); | ||
| useUpdateWithSetter(appInstall, onLoaderStart, function (comp, val) { | ||
| comp.setOnLoaderStart(val); | ||
| }); | ||
| useUpdateWithSetter(appInstall, onLoadError, function (comp, val) { | ||
| comp.setOnLoadError(val); | ||
| }); | ||
| return wrapper; | ||
| }; | ||
| var ConnectAppViewport = function ConnectAppViewport(_ref2) { | ||
| var app = _ref2.app, | ||
| appData = _ref2.appData, | ||
| onLoadError = _ref2.onLoadError, | ||
| onLoaderStart = _ref2.onLoaderStart; | ||
| var _useCreateComponent2 = useCreateComponent('app-viewport'), | ||
| wrapper = _useCreateComponent2.wrapper, | ||
| appViewport = _useCreateComponent2.component; | ||
| useUpdateWithSetter(appViewport, app, function (comp, val) { | ||
| return comp.setApp(val); | ||
| }); | ||
| useUpdateWithSetter(appViewport, appData, function (comp, val) { | ||
| return comp.setAppData(val); | ||
| }); | ||
| useUpdateWithSetter(appViewport, onLoaderStart, function (comp, val) { | ||
| comp.setOnLoaderStart(val); | ||
| }); | ||
| useUpdateWithSetter(appViewport, onLoadError, function (comp, val) { | ||
| comp.setOnLoadError(val); | ||
| }); | ||
| return wrapper; | ||
| }; | ||
| var ConnectBalances = function ConnectBalances(_ref3) { | ||
| var onLoadError = _ref3.onLoadError, | ||
| onLoaderStart = _ref3.onLoaderStart; | ||
| var _useCreateComponent3 = useCreateComponent('balances'), | ||
| wrapper = _useCreateComponent3.wrapper, | ||
| balances = _useCreateComponent3.component; | ||
| useUpdateWithSetter(balances, onLoaderStart, function (comp, val) { | ||
| comp.setOnLoaderStart(val); | ||
| }); | ||
| useUpdateWithSetter(balances, onLoadError, function (comp, val) { | ||
| comp.setOnLoadError(val); | ||
| }); | ||
| return wrapper; | ||
| }; | ||
| var ConnectPayments = function ConnectPayments(_ref4) { | ||
| var defaultFilters = _ref4.defaultFilters, | ||
| onLoadError = _ref4.onLoadError, | ||
| onLoaderStart = _ref4.onLoaderStart; | ||
| var _useCreateComponent4 = useCreateComponent('payments'), | ||
| wrapper = _useCreateComponent4.wrapper, | ||
| payments = _useCreateComponent4.component; | ||
| payments = _useCreateComponent.component; | ||
| useUpdateWithSetter(payments, onLoaderStart, function (comp, val) { | ||
@@ -208,8 +147,8 @@ comp.setOnLoaderStart(val); | ||
| }; | ||
| var ConnectPayouts = function ConnectPayouts(_ref5) { | ||
| var onLoadError = _ref5.onLoadError, | ||
| onLoaderStart = _ref5.onLoaderStart; | ||
| var _useCreateComponent5 = useCreateComponent('payouts'), | ||
| wrapper = _useCreateComponent5.wrapper, | ||
| payouts = _useCreateComponent5.component; | ||
| var ConnectPayouts = function ConnectPayouts(_ref2) { | ||
| var onLoadError = _ref2.onLoadError, | ||
| onLoaderStart = _ref2.onLoaderStart; | ||
| var _useCreateComponent2 = useCreateComponent('payouts'), | ||
| wrapper = _useCreateComponent2.wrapper, | ||
| payouts = _useCreateComponent2.component; | ||
| useUpdateWithSetter(payouts, onLoaderStart, function (comp, val) { | ||
@@ -223,24 +162,10 @@ comp.setOnLoaderStart(val); | ||
| }; | ||
| var ConnectPayoutsList = function ConnectPayoutsList(_ref6) { | ||
| var onLoadError = _ref6.onLoadError, | ||
| onLoaderStart = _ref6.onLoaderStart; | ||
| var _useCreateComponent6 = useCreateComponent('payouts-list'), | ||
| wrapper = _useCreateComponent6.wrapper, | ||
| payoutsList = _useCreateComponent6.component; | ||
| useUpdateWithSetter(payoutsList, onLoaderStart, function (comp, val) { | ||
| comp.setOnLoaderStart(val); | ||
| }); | ||
| useUpdateWithSetter(payoutsList, onLoadError, function (comp, val) { | ||
| comp.setOnLoadError(val); | ||
| }); | ||
| return wrapper; | ||
| }; | ||
| var ConnectPaymentDetails = function ConnectPaymentDetails(_ref7) { | ||
| var payment = _ref7.payment, | ||
| onClose = _ref7.onClose, | ||
| onLoadError = _ref7.onLoadError, | ||
| onLoaderStart = _ref7.onLoaderStart; | ||
| var _useCreateComponent7 = useCreateComponent('payment-details'), | ||
| wrapper = _useCreateComponent7.wrapper, | ||
| paymentDetails = _useCreateComponent7.component; | ||
| var ConnectPaymentDetails = function ConnectPaymentDetails(_ref3) { | ||
| var payment = _ref3.payment, | ||
| onClose = _ref3.onClose, | ||
| onLoadError = _ref3.onLoadError, | ||
| onLoaderStart = _ref3.onLoaderStart; | ||
| var _useCreateComponent3 = useCreateComponent('payment-details'), | ||
| wrapper = _useCreateComponent3.wrapper, | ||
| paymentDetails = _useCreateComponent3.component; | ||
| useUpdateWithSetter(paymentDetails, payment, function (comp, val) { | ||
@@ -260,10 +185,10 @@ return comp.setPayment(val); | ||
| }; | ||
| var ConnectPaymentDisputes = function ConnectPaymentDisputes(_ref8) { | ||
| var payment = _ref8.payment, | ||
| onDisputesLoaded = _ref8.onDisputesLoaded, | ||
| onLoadError = _ref8.onLoadError, | ||
| onLoaderStart = _ref8.onLoaderStart; | ||
| var _useCreateComponent8 = useCreateComponent('payment-disputes'), | ||
| wrapper = _useCreateComponent8.wrapper, | ||
| component = _useCreateComponent8.component; | ||
| var ConnectPaymentDisputes = function ConnectPaymentDisputes(_ref4) { | ||
| var payment = _ref4.payment, | ||
| onDisputesLoaded = _ref4.onDisputesLoaded, | ||
| onLoadError = _ref4.onLoadError, | ||
| onLoaderStart = _ref4.onLoaderStart; | ||
| var _useCreateComponent4 = useCreateComponent('payment-disputes'), | ||
| wrapper = _useCreateComponent4.wrapper, | ||
| component = _useCreateComponent4.component; | ||
| useUpdateWithSetter(component, payment, function (comp, val) { | ||
@@ -283,8 +208,8 @@ return comp.setPayment(val); | ||
| }; | ||
| var ConnectDisputesList = function ConnectDisputesList(_ref9) { | ||
| var onLoadError = _ref9.onLoadError, | ||
| onLoaderStart = _ref9.onLoaderStart; | ||
| var _useCreateComponent9 = useCreateComponent('disputes-list'), | ||
| wrapper = _useCreateComponent9.wrapper, | ||
| component = _useCreateComponent9.component; | ||
| var ConnectDisputesList = function ConnectDisputesList(_ref5) { | ||
| var onLoadError = _ref5.onLoadError, | ||
| onLoaderStart = _ref5.onLoaderStart; | ||
| var _useCreateComponent5 = useCreateComponent('disputes-list'), | ||
| wrapper = _useCreateComponent5.wrapper, | ||
| component = _useCreateComponent5.component; | ||
| useUpdateWithSetter(component, onLoaderStart, function (comp, val) { | ||
@@ -298,15 +223,15 @@ comp.setOnLoaderStart(val); | ||
| }; | ||
| var ConnectAccountOnboarding = function ConnectAccountOnboarding(_ref10) { | ||
| var onExit = _ref10.onExit, | ||
| recipientTermsOfServiceUrl = _ref10.recipientTermsOfServiceUrl, | ||
| fullTermsOfServiceUrl = _ref10.fullTermsOfServiceUrl, | ||
| privacyPolicyUrl = _ref10.privacyPolicyUrl, | ||
| skipTermsOfServiceCollection = _ref10.skipTermsOfServiceCollection, | ||
| collectionOptions = _ref10.collectionOptions, | ||
| onLoadError = _ref10.onLoadError, | ||
| onLoaderStart = _ref10.onLoaderStart, | ||
| onStepChange = _ref10.onStepChange; | ||
| var _useCreateComponent10 = useCreateComponent('account-onboarding'), | ||
| wrapper = _useCreateComponent10.wrapper, | ||
| onboarding = _useCreateComponent10.component; | ||
| var ConnectAccountOnboarding = function ConnectAccountOnboarding(_ref6) { | ||
| var onExit = _ref6.onExit, | ||
| recipientTermsOfServiceUrl = _ref6.recipientTermsOfServiceUrl, | ||
| fullTermsOfServiceUrl = _ref6.fullTermsOfServiceUrl, | ||
| privacyPolicyUrl = _ref6.privacyPolicyUrl, | ||
| skipTermsOfServiceCollection = _ref6.skipTermsOfServiceCollection, | ||
| collectionOptions = _ref6.collectionOptions, | ||
| onLoadError = _ref6.onLoadError, | ||
| onLoaderStart = _ref6.onLoaderStart, | ||
| onStepChange = _ref6.onStepChange; | ||
| var _useCreateComponent6 = useCreateComponent('account-onboarding'), | ||
| wrapper = _useCreateComponent6.wrapper, | ||
| onboarding = _useCreateComponent6.component; | ||
| useUpdateWithSetter(onboarding, recipientTermsOfServiceUrl, function (comp, val) { | ||
@@ -341,27 +266,9 @@ return comp.setRecipientTermsOfServiceUrl(val); | ||
| }; | ||
| var ConnectPaymentMethodSettings = function ConnectPaymentMethodSettings(_ref11) { | ||
| var paymentMethodConfiguration = _ref11.paymentMethodConfiguration, | ||
| onLoadError = _ref11.onLoadError, | ||
| onLoaderStart = _ref11.onLoaderStart; | ||
| var _useCreateComponent11 = useCreateComponent('payment-method-settings'), | ||
| wrapper = _useCreateComponent11.wrapper, | ||
| paymentMethodSettings = _useCreateComponent11.component; | ||
| useUpdateWithSetter(paymentMethodSettings, paymentMethodConfiguration, function (comp, val) { | ||
| return comp.setPaymentMethodConfiguration(val); | ||
| }); | ||
| useUpdateWithSetter(paymentMethodSettings, onLoaderStart, function (comp, val) { | ||
| comp.setOnLoaderStart(val); | ||
| }); | ||
| useUpdateWithSetter(paymentMethodSettings, onLoadError, function (comp, val) { | ||
| comp.setOnLoadError(val); | ||
| }); | ||
| return wrapper; | ||
| }; | ||
| var ConnectAccountManagement = function ConnectAccountManagement(_ref12) { | ||
| var collectionOptions = _ref12.collectionOptions, | ||
| onLoadError = _ref12.onLoadError, | ||
| onLoaderStart = _ref12.onLoaderStart; | ||
| var _useCreateComponent12 = useCreateComponent('account-management'), | ||
| wrapper = _useCreateComponent12.wrapper, | ||
| accountManagement = _useCreateComponent12.component; | ||
| var ConnectAccountManagement = function ConnectAccountManagement(_ref7) { | ||
| var collectionOptions = _ref7.collectionOptions, | ||
| onLoadError = _ref7.onLoadError, | ||
| onLoaderStart = _ref7.onLoaderStart; | ||
| var _useCreateComponent7 = useCreateComponent('account-management'), | ||
| wrapper = _useCreateComponent7.wrapper, | ||
| accountManagement = _useCreateComponent7.component; | ||
| useUpdateWithSetter(accountManagement, collectionOptions, function (comp, val) { | ||
@@ -378,24 +285,10 @@ return comp.setCollectionOptions(val); | ||
| }; | ||
| var ConnectInstantPayouts = function ConnectInstantPayouts(_ref13) { | ||
| var onLoadError = _ref13.onLoadError, | ||
| onLoaderStart = _ref13.onLoaderStart; | ||
| var _useCreateComponent13 = useCreateComponent('instant-payouts'), | ||
| wrapper = _useCreateComponent13.wrapper, | ||
| instantPayouts = _useCreateComponent13.component; | ||
| useUpdateWithSetter(instantPayouts, onLoaderStart, function (comp, val) { | ||
| comp.setOnLoaderStart(val); | ||
| }); | ||
| useUpdateWithSetter(instantPayouts, onLoadError, function (comp, val) { | ||
| comp.setOnLoadError(val); | ||
| }); | ||
| return wrapper; | ||
| }; | ||
| var ConnectNotificationBanner = function ConnectNotificationBanner(_ref14) { | ||
| var collectionOptions = _ref14.collectionOptions, | ||
| onNotificationsChange = _ref14.onNotificationsChange, | ||
| onLoadError = _ref14.onLoadError, | ||
| onLoaderStart = _ref14.onLoaderStart; | ||
| var _useCreateComponent14 = useCreateComponent('notification-banner'), | ||
| wrapper = _useCreateComponent14.wrapper, | ||
| notificationBanner = _useCreateComponent14.component; | ||
| var ConnectNotificationBanner = function ConnectNotificationBanner(_ref8) { | ||
| var collectionOptions = _ref8.collectionOptions, | ||
| onNotificationsChange = _ref8.onNotificationsChange, | ||
| onLoadError = _ref8.onLoadError, | ||
| onLoaderStart = _ref8.onLoaderStart; | ||
| var _useCreateComponent8 = useCreateComponent('notification-banner'), | ||
| wrapper = _useCreateComponent8.wrapper, | ||
| notificationBanner = _useCreateComponent8.component; | ||
| useUpdateWithSetter(notificationBanner, collectionOptions, function (comp, val) { | ||
@@ -415,12 +308,12 @@ return comp.setCollectionOptions(val); | ||
| }; | ||
| var ConnectIssuingCard = function ConnectIssuingCard(_ref15) { | ||
| var defaultCard = _ref15.defaultCard, | ||
| cardSwitching = _ref15.cardSwitching, | ||
| showSpendControls = _ref15.showSpendControls, | ||
| fetchEphemeralKey = _ref15.fetchEphemeralKey, | ||
| onLoadError = _ref15.onLoadError, | ||
| onLoaderStart = _ref15.onLoaderStart; | ||
| var _useCreateComponent15 = useCreateComponent('issuing-card'), | ||
| wrapper = _useCreateComponent15.wrapper, | ||
| issuingCard = _useCreateComponent15.component; | ||
| var ConnectIssuingCard = function ConnectIssuingCard(_ref9) { | ||
| var defaultCard = _ref9.defaultCard, | ||
| cardSwitching = _ref9.cardSwitching, | ||
| showSpendControls = _ref9.showSpendControls, | ||
| fetchEphemeralKey = _ref9.fetchEphemeralKey, | ||
| onLoadError = _ref9.onLoadError, | ||
| onLoaderStart = _ref9.onLoaderStart; | ||
| var _useCreateComponent9 = useCreateComponent('issuing-card'), | ||
| wrapper = _useCreateComponent9.wrapper, | ||
| issuingCard = _useCreateComponent9.component; | ||
| useUpdateWithSetter(issuingCard, defaultCard, function (comp, val) { | ||
@@ -446,11 +339,11 @@ return comp.setDefaultCard(val); | ||
| }; | ||
| var ConnectIssuingCardsList = function ConnectIssuingCardsList(_ref16) { | ||
| var showSpendControls = _ref16.showSpendControls, | ||
| issuingProgram = _ref16.issuingProgram, | ||
| fetchEphemeralKey = _ref16.fetchEphemeralKey, | ||
| onLoadError = _ref16.onLoadError, | ||
| onLoaderStart = _ref16.onLoaderStart; | ||
| var _useCreateComponent16 = useCreateComponent('issuing-cards-list'), | ||
| wrapper = _useCreateComponent16.wrapper, | ||
| issuingCardsList = _useCreateComponent16.component; | ||
| var ConnectIssuingCardsList = function ConnectIssuingCardsList(_ref10) { | ||
| var showSpendControls = _ref10.showSpendControls, | ||
| issuingProgram = _ref10.issuingProgram, | ||
| fetchEphemeralKey = _ref10.fetchEphemeralKey, | ||
| onLoadError = _ref10.onLoadError, | ||
| onLoaderStart = _ref10.onLoaderStart; | ||
| var _useCreateComponent10 = useCreateComponent('issuing-cards-list'), | ||
| wrapper = _useCreateComponent10.wrapper, | ||
| issuingCardsList = _useCreateComponent10.component; | ||
| useUpdateWithSetter(issuingCardsList, showSpendControls, function (comp, val) { | ||
@@ -473,9 +366,9 @@ return comp.setShowSpendControls(val); | ||
| }; | ||
| var ConnectFinancialAccount = function ConnectFinancialAccount(_ref17) { | ||
| var financialAccount = _ref17.financialAccount, | ||
| onLoadError = _ref17.onLoadError, | ||
| onLoaderStart = _ref17.onLoaderStart; | ||
| var _useCreateComponent17 = useCreateComponent('financial-account'), | ||
| wrapper = _useCreateComponent17.wrapper, | ||
| financialAccountComponent = _useCreateComponent17.component; | ||
| var ConnectFinancialAccount = function ConnectFinancialAccount(_ref11) { | ||
| var financialAccount = _ref11.financialAccount, | ||
| onLoadError = _ref11.onLoadError, | ||
| onLoaderStart = _ref11.onLoaderStart; | ||
| var _useCreateComponent11 = useCreateComponent('financial-account'), | ||
| wrapper = _useCreateComponent11.wrapper, | ||
| financialAccountComponent = _useCreateComponent11.component; | ||
| useUpdateWithSetter(financialAccountComponent, financialAccount, function (comp, val) { | ||
@@ -492,9 +385,9 @@ return comp.setFinancialAccount(val); | ||
| }; | ||
| var ConnectFinancialAccountTransactions = function ConnectFinancialAccountTransactions(_ref18) { | ||
| var financialAccount = _ref18.financialAccount, | ||
| onLoadError = _ref18.onLoadError, | ||
| onLoaderStart = _ref18.onLoaderStart; | ||
| var _useCreateComponent18 = useCreateComponent('financial-account-transactions'), | ||
| wrapper = _useCreateComponent18.wrapper, | ||
| financialAccountTransactionsComponent = _useCreateComponent18.component; | ||
| var ConnectFinancialAccountTransactions = function ConnectFinancialAccountTransactions(_ref12) { | ||
| var financialAccount = _ref12.financialAccount, | ||
| onLoadError = _ref12.onLoadError, | ||
| onLoaderStart = _ref12.onLoaderStart; | ||
| var _useCreateComponent12 = useCreateComponent('financial-account-transactions'), | ||
| wrapper = _useCreateComponent12.wrapper, | ||
| financialAccountTransactionsComponent = _useCreateComponent12.component; | ||
| useUpdateWithSetter(financialAccountTransactionsComponent, financialAccount, function (comp, val) { | ||
@@ -511,16 +404,12 @@ return comp.setFinancialAccount(val); | ||
| }; | ||
| var ConnectRecipients = function ConnectRecipients(_ref19) { | ||
| var dataSource = _ref19.dataSource, | ||
| onLoadError = _ref19.onLoadError, | ||
| onLoaderStart = _ref19.onLoaderStart; | ||
| var _useCreateComponent19 = useCreateComponent('recipients'), | ||
| wrapper = _useCreateComponent19.wrapper, | ||
| recipientsComponent = _useCreateComponent19.component; | ||
| useUpdateWithSetter(recipientsComponent, dataSource, function (comp, val) { | ||
| return comp.setDataSource(val); | ||
| }); | ||
| useUpdateWithSetter(recipientsComponent, onLoaderStart, function (comp, val) { | ||
| var ConnectDocuments = function ConnectDocuments(_ref13) { | ||
| var onLoadError = _ref13.onLoadError, | ||
| onLoaderStart = _ref13.onLoaderStart; | ||
| var _useCreateComponent13 = useCreateComponent('documents'), | ||
| wrapper = _useCreateComponent13.wrapper, | ||
| documents = _useCreateComponent13.component; | ||
| useUpdateWithSetter(documents, onLoaderStart, function (comp, val) { | ||
| comp.setOnLoaderStart(val); | ||
| }); | ||
| useUpdateWithSetter(recipientsComponent, onLoadError, function (comp, val) { | ||
| useUpdateWithSetter(documents, onLoadError, function (comp, val) { | ||
| comp.setOnLoadError(val); | ||
@@ -530,12 +419,12 @@ }); | ||
| }; | ||
| var ConnectCapitalOverview = function ConnectCapitalOverview(_ref20) { | ||
| var onLoadError = _ref20.onLoadError, | ||
| onLoaderStart = _ref20.onLoaderStart; | ||
| var _useCreateComponent20 = useCreateComponent('capital-overview'), | ||
| wrapper = _useCreateComponent20.wrapper, | ||
| capitalOverview = _useCreateComponent20.component; | ||
| useUpdateWithSetter(capitalOverview, onLoaderStart, function (comp, val) { | ||
| var ConnectPayoutsList = function ConnectPayoutsList(_ref14) { | ||
| var onLoadError = _ref14.onLoadError, | ||
| onLoaderStart = _ref14.onLoaderStart; | ||
| var _useCreateComponent14 = useCreateComponent('payouts-list'), | ||
| wrapper = _useCreateComponent14.wrapper, | ||
| payoutsList = _useCreateComponent14.component; | ||
| useUpdateWithSetter(payoutsList, onLoaderStart, function (comp, val) { | ||
| comp.setOnLoaderStart(val); | ||
| }); | ||
| useUpdateWithSetter(capitalOverview, onLoadError, function (comp, val) { | ||
| useUpdateWithSetter(payoutsList, onLoadError, function (comp, val) { | ||
| comp.setOnLoadError(val); | ||
@@ -545,32 +434,12 @@ }); | ||
| }; | ||
| var ConnectCapitalFinancing = function ConnectCapitalFinancing(_ref21) { | ||
| var defaultFinancingOffer = _ref21.defaultFinancingOffer, | ||
| showFinancingSelector = _ref21.showFinancingSelector, | ||
| howCapitalWorksUrl = _ref21.howCapitalWorksUrl, | ||
| supportUrl = _ref21.supportUrl, | ||
| onFinancingsLoaded = _ref21.onFinancingsLoaded, | ||
| onLoadError = _ref21.onLoadError, | ||
| onLoaderStart = _ref21.onLoaderStart; | ||
| var _useCreateComponent21 = useCreateComponent('capital-financing'), | ||
| wrapper = _useCreateComponent21.wrapper, | ||
| capitalFinancing = _useCreateComponent21.component; | ||
| useUpdateWithSetter(capitalFinancing, defaultFinancingOffer, function (comp, val) { | ||
| return comp.setDefaultFinancingOffer(val); | ||
| }); | ||
| useUpdateWithSetter(capitalFinancing, showFinancingSelector, function (comp, val) { | ||
| return comp.setShowFinancingSelector(val); | ||
| }); | ||
| useUpdateWithSetter(capitalFinancing, howCapitalWorksUrl, function (comp, val) { | ||
| return comp.setHowCapitalWorksUrl(val); | ||
| }); | ||
| useUpdateWithSetter(capitalFinancing, supportUrl, function (comp, val) { | ||
| return comp.setSupportUrl(val); | ||
| }); | ||
| useUpdateWithSetter(capitalFinancing, onFinancingsLoaded, function (comp, val) { | ||
| return comp.setOnFinancingsLoaded(val); | ||
| }); | ||
| useUpdateWithSetter(capitalFinancing, onLoaderStart, function (comp, val) { | ||
| var ConnectBalances = function ConnectBalances(_ref15) { | ||
| var onLoadError = _ref15.onLoadError, | ||
| onLoaderStart = _ref15.onLoaderStart; | ||
| var _useCreateComponent15 = useCreateComponent('balances'), | ||
| wrapper = _useCreateComponent15.wrapper, | ||
| balances = _useCreateComponent15.component; | ||
| useUpdateWithSetter(balances, onLoaderStart, function (comp, val) { | ||
| comp.setOnLoaderStart(val); | ||
| }); | ||
| useUpdateWithSetter(capitalFinancing, onLoadError, function (comp, val) { | ||
| useUpdateWithSetter(balances, onLoadError, function (comp, val) { | ||
| comp.setOnLoadError(val); | ||
@@ -580,126 +449,11 @@ }); | ||
| }; | ||
| var ConnectCapitalFinancingApplication = function ConnectCapitalFinancingApplication(_ref22) { | ||
| var onApplicationSubmitted = _ref22.onApplicationSubmitted, | ||
| onApplicationStepChange = _ref22.onApplicationStepChange, | ||
| privacyPolicyUrl = _ref22.privacyPolicyUrl, | ||
| howCapitalWorksUrl = _ref22.howCapitalWorksUrl, | ||
| onLoadError = _ref22.onLoadError, | ||
| onLoaderStart = _ref22.onLoaderStart; | ||
| var _useCreateComponent22 = useCreateComponent('capital-financing-application'), | ||
| wrapper = _useCreateComponent22.wrapper, | ||
| capitalFinancingApplication = _useCreateComponent22.component; | ||
| useUpdateWithSetter(capitalFinancingApplication, onApplicationSubmitted, function (comp, val) { | ||
| return comp.setOnApplicationSubmitted(val); | ||
| }); | ||
| useUpdateWithSetter(capitalFinancingApplication, onApplicationStepChange, function (comp, val) { | ||
| return comp.setOnApplicationStepChange(val); | ||
| }); | ||
| useUpdateWithSetter(capitalFinancingApplication, privacyPolicyUrl, function (comp, val) { | ||
| return comp.setPrivacyPolicyUrl(val); | ||
| }); | ||
| useUpdateWithSetter(capitalFinancingApplication, howCapitalWorksUrl, function (comp, val) { | ||
| return comp.setHowCapitalWorksUrl(val); | ||
| }); | ||
| useUpdateWithSetter(capitalFinancingApplication, onLoaderStart, function (comp, val) { | ||
| comp.setOnLoaderStart(val); | ||
| }); | ||
| useUpdateWithSetter(capitalFinancingApplication, onLoadError, function (comp, val) { | ||
| comp.setOnLoadError(val); | ||
| }); | ||
| return wrapper; | ||
| }; | ||
| var ConnectCapitalFinancingPromotion = function ConnectCapitalFinancingPromotion(_ref23) { | ||
| var layout = _ref23.layout, | ||
| onApplicationSubmitted = _ref23.onApplicationSubmitted, | ||
| onEligibleFinancingOfferLoaded = _ref23.onEligibleFinancingOfferLoaded, | ||
| onApplicationStepChange = _ref23.onApplicationStepChange, | ||
| privacyPolicyUrl = _ref23.privacyPolicyUrl, | ||
| howCapitalWorksUrl = _ref23.howCapitalWorksUrl, | ||
| eligibilityCriteriaUrl = _ref23.eligibilityCriteriaUrl, | ||
| onLoadError = _ref23.onLoadError, | ||
| onLoaderStart = _ref23.onLoaderStart; | ||
| var _useCreateComponent23 = useCreateComponent('capital-financing-promotion'), | ||
| wrapper = _useCreateComponent23.wrapper, | ||
| capitalPromotion = _useCreateComponent23.component; | ||
| useUpdateWithSetter(capitalPromotion, layout, function (comp, val) { | ||
| return comp.setLayout(val); | ||
| }); | ||
| useUpdateWithSetter(capitalPromotion, privacyPolicyUrl, function (comp, val) { | ||
| return comp.setPrivacyPolicyUrl(val); | ||
| }); | ||
| useUpdateWithSetter(capitalPromotion, howCapitalWorksUrl, function (comp, val) { | ||
| return comp.setHowCapitalWorksUrl(val); | ||
| }); | ||
| useUpdateWithSetter(capitalPromotion, eligibilityCriteriaUrl, function (comp, val) { | ||
| return comp.setEligibilityCriteriaUrl(val); | ||
| }); | ||
| useUpdateWithSetter(capitalPromotion, onApplicationSubmitted, function (comp, val) { | ||
| return comp.setOnApplicationSubmitted(val); | ||
| }); | ||
| useUpdateWithSetter(capitalPromotion, onApplicationStepChange, function (comp, val) { | ||
| return comp.setOnApplicationStepChange(val); | ||
| }); | ||
| useUpdateWithSetter(capitalPromotion, onEligibleFinancingOfferLoaded, function (comp, val) { | ||
| return comp.setOnEligibleFinancingOfferLoaded(val); | ||
| }); | ||
| useUpdateWithSetter(capitalPromotion, onLoaderStart, function (comp, val) { | ||
| comp.setOnLoaderStart(val); | ||
| }); | ||
| useUpdateWithSetter(capitalPromotion, onLoadError, function (comp, val) { | ||
| comp.setOnLoadError(val); | ||
| }); | ||
| return wrapper; | ||
| }; | ||
| var ConnectDocuments = function ConnectDocuments(_ref24) { | ||
| var onLoadError = _ref24.onLoadError, | ||
| onLoaderStart = _ref24.onLoaderStart; | ||
| var _useCreateComponent24 = useCreateComponent('documents'), | ||
| wrapper = _useCreateComponent24.wrapper, | ||
| documents = _useCreateComponent24.component; | ||
| useUpdateWithSetter(documents, onLoaderStart, function (comp, val) { | ||
| comp.setOnLoaderStart(val); | ||
| }); | ||
| useUpdateWithSetter(documents, onLoadError, function (comp, val) { | ||
| comp.setOnLoadError(val); | ||
| }); | ||
| return wrapper; | ||
| }; | ||
| var ConnectProductTaxCodeSelector = function ConnectProductTaxCodeSelector(_ref25) { | ||
| var onLoadError = _ref25.onLoadError, | ||
| onLoaderStart = _ref25.onLoaderStart, | ||
| onTaxCodeSelect = _ref25.onTaxCodeSelect, | ||
| hideDescription = _ref25.hideDescription, | ||
| disabled = _ref25.disabled, | ||
| initialTaxCode = _ref25.initialTaxCode; | ||
| var _useCreateComponent25 = useCreateComponent('product-tax-code-selector'), | ||
| wrapper = _useCreateComponent25.wrapper, | ||
| productTaxCodeSelector = _useCreateComponent25.component; | ||
| useUpdateWithSetter(productTaxCodeSelector, onLoaderStart, function (comp, val) { | ||
| comp.setOnLoaderStart(val); | ||
| }); | ||
| useUpdateWithSetter(productTaxCodeSelector, onLoadError, function (comp, val) { | ||
| comp.setOnLoadError(val); | ||
| }); | ||
| useUpdateWithSetter(productTaxCodeSelector, onTaxCodeSelect, function (comp, val) { | ||
| comp.setOnTaxCodeSelect(val); | ||
| }); | ||
| useUpdateWithSetter(productTaxCodeSelector, hideDescription, function (comp, val) { | ||
| comp.setHideDescription(val); | ||
| }); | ||
| useUpdateWithSetter(productTaxCodeSelector, disabled, function (comp, val) { | ||
| comp.setDisabled(val); | ||
| }); | ||
| useUpdateWithSetter(productTaxCodeSelector, initialTaxCode, function (comp, val) { | ||
| comp.setInitialTaxCode(val); | ||
| }); | ||
| return wrapper; | ||
| }; | ||
| var ConnectTaxRegistrations = function ConnectTaxRegistrations(_ref26) { | ||
| var onLoadError = _ref26.onLoadError, | ||
| onLoaderStart = _ref26.onLoaderStart, | ||
| displayCountries = _ref26.displayCountries, | ||
| onAfterTaxRegistrationAdded = _ref26.onAfterTaxRegistrationAdded; | ||
| var _useCreateComponent26 = useCreateComponent('tax-registrations'), | ||
| wrapper = _useCreateComponent26.wrapper, | ||
| taxRegistrations = _useCreateComponent26.component; | ||
| var ConnectTaxRegistrations = function ConnectTaxRegistrations(_ref16) { | ||
| var onLoadError = _ref16.onLoadError, | ||
| onLoaderStart = _ref16.onLoaderStart, | ||
| displayCountries = _ref16.displayCountries, | ||
| onAfterTaxRegistrationAdded = _ref16.onAfterTaxRegistrationAdded, | ||
| onAfterTaxRegistrationExpired = _ref16.onAfterTaxRegistrationExpired; | ||
| var _useCreateComponent16 = useCreateComponent('tax-registrations'), | ||
| wrapper = _useCreateComponent16.wrapper, | ||
| taxRegistrations = _useCreateComponent16.component; | ||
| useUpdateWithSetter(taxRegistrations, onLoaderStart, function (comp, val) { | ||
@@ -717,27 +471,16 @@ comp.setOnLoaderStart(val); | ||
| }); | ||
| return wrapper; | ||
| }; | ||
| var ConnectExportTaxTransactions = function ConnectExportTaxTransactions(_ref27) { | ||
| var onLoadError = _ref27.onLoadError, | ||
| onLoaderStart = _ref27.onLoaderStart; | ||
| var _useCreateComponent27 = useCreateComponent('export-tax-transactions'), | ||
| wrapper = _useCreateComponent27.wrapper, | ||
| exportTaxTransactions = _useCreateComponent27.component; | ||
| useUpdateWithSetter(exportTaxTransactions, onLoaderStart, function (comp, val) { | ||
| comp.setOnLoaderStart(val); | ||
| useUpdateWithSetter(taxRegistrations, onAfterTaxRegistrationExpired, function (comp, val) { | ||
| comp.setOnAfterTaxRegistrationExpired(val); | ||
| }); | ||
| useUpdateWithSetter(exportTaxTransactions, onLoadError, function (comp, val) { | ||
| comp.setOnLoadError(val); | ||
| }); | ||
| return wrapper; | ||
| }; | ||
| var ConnectTaxSettings = function ConnectTaxSettings(_ref28) { | ||
| var onLoadError = _ref28.onLoadError, | ||
| onLoaderStart = _ref28.onLoaderStart, | ||
| hideProductTaxCodeSelector = _ref28.hideProductTaxCodeSelector, | ||
| displayHeadOfficeCountries = _ref28.displayHeadOfficeCountries, | ||
| onTaxSettingsUpdated = _ref28.onTaxSettingsUpdated; | ||
| var _useCreateComponent28 = useCreateComponent('tax-settings'), | ||
| wrapper = _useCreateComponent28.wrapper, | ||
| taxSettings = _useCreateComponent28.component; | ||
| var ConnectTaxSettings = function ConnectTaxSettings(_ref17) { | ||
| var onLoadError = _ref17.onLoadError, | ||
| onLoaderStart = _ref17.onLoaderStart, | ||
| hideProductTaxCodeSelector = _ref17.hideProductTaxCodeSelector, | ||
| displayHeadOfficeCountries = _ref17.displayHeadOfficeCountries, | ||
| onTaxSettingsUpdated = _ref17.onTaxSettingsUpdated; | ||
| var _useCreateComponent17 = useCreateComponent('tax-settings'), | ||
| wrapper = _useCreateComponent17.wrapper, | ||
| taxSettings = _useCreateComponent17.component; | ||
| useUpdateWithSetter(taxSettings, onLoaderStart, function (comp, val) { | ||
@@ -760,58 +503,10 @@ comp.setOnLoaderStart(val); | ||
| }; | ||
| var ConnectTaxThresholdMonitoring = function ConnectTaxThresholdMonitoring(_ref29) { | ||
| var onLoadError = _ref29.onLoadError, | ||
| onLoaderStart = _ref29.onLoaderStart, | ||
| displayCountries = _ref29.displayCountries; | ||
| var _useCreateComponent29 = useCreateComponent('tax-threshold-monitoring'), | ||
| wrapper = _useCreateComponent29.wrapper, | ||
| taxSettings = _useCreateComponent29.component; | ||
| useUpdateWithSetter(taxSettings, onLoaderStart, function (comp, val) { | ||
| comp.setOnLoaderStart(val); | ||
| }); | ||
| useUpdateWithSetter(taxSettings, onLoadError, function (comp, val) { | ||
| comp.setOnLoadError(val); | ||
| }); | ||
| useUpdateWithSetter(taxSettings, displayCountries, function (comp, val) { | ||
| comp.setDisplayCountries(val); | ||
| }); | ||
| return wrapper; | ||
| }; | ||
| var ConnectReportingChart = function ConnectReportingChart(_ref30) { | ||
| var reportName = _ref30.reportName, | ||
| intervalStart = _ref30.intervalStart, | ||
| intervalEnd = _ref30.intervalEnd, | ||
| intervalType = _ref30.intervalType, | ||
| onLoadError = _ref30.onLoadError, | ||
| onLoaderStart = _ref30.onLoaderStart; | ||
| var _useCreateComponent30 = useCreateComponent('reporting-chart'), | ||
| wrapper = _useCreateComponent30.wrapper, | ||
| reportingChart = _useCreateComponent30.component; | ||
| useUpdateWithSetter(reportingChart, reportName, function (comp, val) { | ||
| return comp.setReportName(val); | ||
| }); | ||
| useUpdateWithSetter(reportingChart, intervalStart, function (comp, val) { | ||
| return comp.setIntervalStart(val); | ||
| }); | ||
| useUpdateWithSetter(reportingChart, intervalEnd, function (comp, val) { | ||
| return comp.setIntervalEnd(val); | ||
| }); | ||
| useUpdateWithSetter(reportingChart, intervalType, function (comp, val) { | ||
| return comp.setIntervalType(val); | ||
| }); | ||
| useUpdateWithSetter(reportingChart, onLoaderStart, function (comp, val) { | ||
| comp.setOnLoaderStart(val); | ||
| }); | ||
| useUpdateWithSetter(reportingChart, onLoadError, function (comp, val) { | ||
| comp.setOnLoadError(val); | ||
| }); | ||
| return wrapper; | ||
| }; | ||
| var ConnectInstantPayoutsPromotion = function ConnectInstantPayoutsPromotion(_ref31) { | ||
| var onInstantPayoutsPromotionLoaded = _ref31.onInstantPayoutsPromotionLoaded, | ||
| onInstantPayoutCreated = _ref31.onInstantPayoutCreated, | ||
| onLoadError = _ref31.onLoadError, | ||
| onLoaderStart = _ref31.onLoaderStart; | ||
| var _useCreateComponent31 = useCreateComponent('instant-payouts-promotion'), | ||
| wrapper = _useCreateComponent31.wrapper, | ||
| instantPayoutsPromotion = _useCreateComponent31.component; | ||
| var ConnectInstantPayoutsPromotion = function ConnectInstantPayoutsPromotion(_ref18) { | ||
| var onInstantPayoutsPromotionLoaded = _ref18.onInstantPayoutsPromotionLoaded, | ||
| onInstantPayoutCreated = _ref18.onInstantPayoutCreated, | ||
| onLoadError = _ref18.onLoadError, | ||
| onLoaderStart = _ref18.onLoaderStart; | ||
| var _useCreateComponent18 = useCreateComponent('instant-payouts-promotion'), | ||
| wrapper = _useCreateComponent18.wrapper, | ||
| instantPayoutsPromotion = _useCreateComponent18.component; | ||
| useUpdateWithSetter(instantPayoutsPromotion, onLoaderStart, function (comp, val) { | ||
@@ -831,10 +526,10 @@ comp.setOnLoaderStart(val); | ||
| }; | ||
| var ConnectPayoutDetails = function ConnectPayoutDetails(_ref32) { | ||
| var payout = _ref32.payout, | ||
| onClose = _ref32.onClose, | ||
| onLoadError = _ref32.onLoadError, | ||
| onLoaderStart = _ref32.onLoaderStart; | ||
| var _useCreateComponent32 = useCreateComponent('payout-details'), | ||
| wrapper = _useCreateComponent32.wrapper, | ||
| payoutDetails = _useCreateComponent32.component; | ||
| var ConnectPayoutDetails = function ConnectPayoutDetails(_ref19) { | ||
| var payout = _ref19.payout, | ||
| onClose = _ref19.onClose, | ||
| onLoadError = _ref19.onLoadError, | ||
| onLoaderStart = _ref19.onLoaderStart; | ||
| var _useCreateComponent19 = useCreateComponent('payout-details'), | ||
| wrapper = _useCreateComponent19.wrapper, | ||
| payoutDetails = _useCreateComponent19.component; | ||
| useUpdateWithSetter(payoutDetails, payout, function (comp, val) { | ||
@@ -854,2 +549,34 @@ return comp.setPayout(val); | ||
| }; | ||
| var ConnectBalanceReport = function ConnectBalanceReport(_ref20) { | ||
| var onLoadError = _ref20.onLoadError, | ||
| onLoaderStart = _ref20.onLoaderStart; | ||
| var _useCreateComponent20 = useCreateComponent('balance-report'), | ||
| wrapper = _useCreateComponent20.wrapper, | ||
| balanceReport = _useCreateComponent20.component; | ||
| useUpdateWithSetter(balanceReport, onLoaderStart, function (comp, val) { | ||
| comp.setOnLoaderStart(val); | ||
| }); | ||
| useUpdateWithSetter(balanceReport, onLoadError, function (comp, val) { | ||
| comp.setOnLoadError(val); | ||
| }); | ||
| return wrapper; | ||
| }; | ||
| var ConnectPayoutReconciliationReport = function ConnectPayoutReconciliationReport(_ref21) { | ||
| var onReportAvailabilityLoaded = _ref21.onReportAvailabilityLoaded, | ||
| onLoadError = _ref21.onLoadError, | ||
| onLoaderStart = _ref21.onLoaderStart; | ||
| var _useCreateComponent21 = useCreateComponent('payout-reconciliation-report'), | ||
| wrapper = _useCreateComponent21.wrapper, | ||
| payoutReconciliationReport = _useCreateComponent21.component; | ||
| useUpdateWithSetter(payoutReconciliationReport, onReportAvailabilityLoaded, function (comp, val) { | ||
| comp.setOnReportAvailabilityLoaded(val); | ||
| }); | ||
| useUpdateWithSetter(payoutReconciliationReport, onLoaderStart, function (comp, val) { | ||
| comp.setOnLoaderStart(val); | ||
| }); | ||
| useUpdateWithSetter(payoutReconciliationReport, onLoadError, function (comp, val) { | ||
| comp.setOnLoadError(val); | ||
| }); | ||
| return wrapper; | ||
| }; | ||
@@ -895,2 +622,2 @@ /** | ||
| export { ConnectAccountManagement, ConnectAccountOnboarding, ConnectAppInstall, ConnectAppViewport, ConnectBalances, ConnectCapitalFinancing, ConnectCapitalFinancingApplication, ConnectCapitalFinancingPromotion, ConnectCapitalOverview, ConnectComponentsProvider, ConnectDisputesList, ConnectDocuments, ConnectElementEventNames, ConnectExportTaxTransactions, ConnectFinancialAccount, ConnectFinancialAccountTransactions, ConnectInstantPayouts, ConnectInstantPayoutsPromotion, ConnectIssuingCard, ConnectIssuingCardsList, ConnectNotificationBanner, ConnectPaymentDetails, ConnectPaymentDisputes, ConnectPaymentMethodSettings, ConnectPayments, ConnectPayoutDetails, ConnectPayouts, ConnectPayoutsList, ConnectProductTaxCodeSelector, ConnectRecipients, ConnectReportingChart, ConnectTaxRegistrations, ConnectTaxSettings, ConnectTaxThresholdMonitoring, useAttachAttribute, useAttachEvent, useConnectComponents, useCreateComponent, useUpdateWithSetter }; | ||
| export { ConnectAccountManagement, ConnectAccountOnboarding, ConnectBalanceReport, ConnectBalances, ConnectComponentsProvider, ConnectDisputesList, ConnectDocuments, ConnectElementEventNames, ConnectFinancialAccount, ConnectFinancialAccountTransactions, ConnectInstantPayoutsPromotion, ConnectIssuingCard, ConnectIssuingCardsList, ConnectNotificationBanner, ConnectPaymentDetails, ConnectPaymentDisputes, ConnectPayments, ConnectPayoutDetails, ConnectPayoutReconciliationReport, ConnectPayouts, ConnectPayoutsList, ConnectTaxRegistrations, ConnectTaxSettings, useAttachAttribute, useAttachEvent, useConnectComponents, useCreateComponent, useUpdateWithSetter }; |
+207
-491
@@ -30,10 +30,2 @@ 'use strict'; | ||
| function _arrayLikeToArray(r, a) { | ||
| (null == a || a > r.length) && (a = r.length); | ||
| for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; | ||
| return n; | ||
| } | ||
| function _arrayWithHoles(r) { | ||
| if (Array.isArray(r)) return r; | ||
| } | ||
| function _iterableToArrayLimit(r, l) { | ||
@@ -66,15 +58,24 @@ var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; | ||
| } | ||
| function _slicedToArray(arr, i) { | ||
| return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); | ||
| } | ||
| function _arrayWithHoles(arr) { | ||
| if (Array.isArray(arr)) return arr; | ||
| } | ||
| function _unsupportedIterableToArray(o, minLen) { | ||
| if (!o) return; | ||
| if (typeof o === "string") return _arrayLikeToArray(o, minLen); | ||
| var n = Object.prototype.toString.call(o).slice(8, -1); | ||
| if (n === "Object" && o.constructor) n = o.constructor.name; | ||
| if (n === "Map" || n === "Set") return Array.from(o); | ||
| if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); | ||
| } | ||
| function _arrayLikeToArray(arr, len) { | ||
| if (len == null || len > arr.length) len = arr.length; | ||
| for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; | ||
| return arr2; | ||
| } | ||
| function _nonIterableRest() { | ||
| throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | ||
| } | ||
| function _slicedToArray(r, e) { | ||
| return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); | ||
| } | ||
| function _unsupportedIterableToArray(r, a) { | ||
| if (r) { | ||
| if ("string" == typeof r) return _arrayLikeToArray(r, a); | ||
| var t = {}.toString.call(r).slice(8, -1); | ||
| return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; | ||
| } | ||
| } | ||
@@ -124,3 +125,3 @@ var ConnectComponentsContext = /*#__PURE__*/React__namespace.createContext(null); | ||
| try { | ||
| newComponent.setAttribute('reactSdkAnalytics', '3.3.36-preview-1'); | ||
| newComponent.setAttribute('reactSdkAnalytics', '3.3.36'); | ||
| } catch (e) { | ||
@@ -154,71 +155,9 @@ console.log('Error setting React Sdk version with error message: ', e); | ||
| var ConnectAppInstall = function ConnectAppInstall(_ref) { | ||
| var app = _ref.app, | ||
| onAppInstallStateFetch = _ref.onAppInstallStateFetch, | ||
| onAppInstallStateChange = _ref.onAppInstallStateChange, | ||
| var ConnectPayments = function ConnectPayments(_ref) { | ||
| var defaultFilters = _ref.defaultFilters, | ||
| onLoadError = _ref.onLoadError, | ||
| onLoaderStart = _ref.onLoaderStart; | ||
| var _useCreateComponent = useCreateComponent('app-install'), | ||
| var _useCreateComponent = useCreateComponent('payments'), | ||
| wrapper = _useCreateComponent.wrapper, | ||
| appInstall = _useCreateComponent.component; | ||
| useUpdateWithSetter(appInstall, app, function (comp, val) { | ||
| return comp.setApp(val); | ||
| }); | ||
| useUpdateWithSetter(appInstall, onAppInstallStateFetch, function (comp, val) { | ||
| return comp.setOnAppInstallStateFetched(val); | ||
| }); | ||
| useUpdateWithSetter(appInstall, onAppInstallStateChange, function (comp, val) { | ||
| return comp.setOnAppInstallStateChanged(val); | ||
| }); | ||
| useUpdateWithSetter(appInstall, onLoaderStart, function (comp, val) { | ||
| comp.setOnLoaderStart(val); | ||
| }); | ||
| useUpdateWithSetter(appInstall, onLoadError, function (comp, val) { | ||
| comp.setOnLoadError(val); | ||
| }); | ||
| return wrapper; | ||
| }; | ||
| var ConnectAppViewport = function ConnectAppViewport(_ref2) { | ||
| var app = _ref2.app, | ||
| appData = _ref2.appData, | ||
| onLoadError = _ref2.onLoadError, | ||
| onLoaderStart = _ref2.onLoaderStart; | ||
| var _useCreateComponent2 = useCreateComponent('app-viewport'), | ||
| wrapper = _useCreateComponent2.wrapper, | ||
| appViewport = _useCreateComponent2.component; | ||
| useUpdateWithSetter(appViewport, app, function (comp, val) { | ||
| return comp.setApp(val); | ||
| }); | ||
| useUpdateWithSetter(appViewport, appData, function (comp, val) { | ||
| return comp.setAppData(val); | ||
| }); | ||
| useUpdateWithSetter(appViewport, onLoaderStart, function (comp, val) { | ||
| comp.setOnLoaderStart(val); | ||
| }); | ||
| useUpdateWithSetter(appViewport, onLoadError, function (comp, val) { | ||
| comp.setOnLoadError(val); | ||
| }); | ||
| return wrapper; | ||
| }; | ||
| var ConnectBalances = function ConnectBalances(_ref3) { | ||
| var onLoadError = _ref3.onLoadError, | ||
| onLoaderStart = _ref3.onLoaderStart; | ||
| var _useCreateComponent3 = useCreateComponent('balances'), | ||
| wrapper = _useCreateComponent3.wrapper, | ||
| balances = _useCreateComponent3.component; | ||
| useUpdateWithSetter(balances, onLoaderStart, function (comp, val) { | ||
| comp.setOnLoaderStart(val); | ||
| }); | ||
| useUpdateWithSetter(balances, onLoadError, function (comp, val) { | ||
| comp.setOnLoadError(val); | ||
| }); | ||
| return wrapper; | ||
| }; | ||
| var ConnectPayments = function ConnectPayments(_ref4) { | ||
| var defaultFilters = _ref4.defaultFilters, | ||
| onLoadError = _ref4.onLoadError, | ||
| onLoaderStart = _ref4.onLoaderStart; | ||
| var _useCreateComponent4 = useCreateComponent('payments'), | ||
| wrapper = _useCreateComponent4.wrapper, | ||
| payments = _useCreateComponent4.component; | ||
| payments = _useCreateComponent.component; | ||
| useUpdateWithSetter(payments, onLoaderStart, function (comp, val) { | ||
@@ -235,8 +174,8 @@ comp.setOnLoaderStart(val); | ||
| }; | ||
| var ConnectPayouts = function ConnectPayouts(_ref5) { | ||
| var onLoadError = _ref5.onLoadError, | ||
| onLoaderStart = _ref5.onLoaderStart; | ||
| var _useCreateComponent5 = useCreateComponent('payouts'), | ||
| wrapper = _useCreateComponent5.wrapper, | ||
| payouts = _useCreateComponent5.component; | ||
| var ConnectPayouts = function ConnectPayouts(_ref2) { | ||
| var onLoadError = _ref2.onLoadError, | ||
| onLoaderStart = _ref2.onLoaderStart; | ||
| var _useCreateComponent2 = useCreateComponent('payouts'), | ||
| wrapper = _useCreateComponent2.wrapper, | ||
| payouts = _useCreateComponent2.component; | ||
| useUpdateWithSetter(payouts, onLoaderStart, function (comp, val) { | ||
@@ -250,24 +189,10 @@ comp.setOnLoaderStart(val); | ||
| }; | ||
| var ConnectPayoutsList = function ConnectPayoutsList(_ref6) { | ||
| var onLoadError = _ref6.onLoadError, | ||
| onLoaderStart = _ref6.onLoaderStart; | ||
| var _useCreateComponent6 = useCreateComponent('payouts-list'), | ||
| wrapper = _useCreateComponent6.wrapper, | ||
| payoutsList = _useCreateComponent6.component; | ||
| useUpdateWithSetter(payoutsList, onLoaderStart, function (comp, val) { | ||
| comp.setOnLoaderStart(val); | ||
| }); | ||
| useUpdateWithSetter(payoutsList, onLoadError, function (comp, val) { | ||
| comp.setOnLoadError(val); | ||
| }); | ||
| return wrapper; | ||
| }; | ||
| var ConnectPaymentDetails = function ConnectPaymentDetails(_ref7) { | ||
| var payment = _ref7.payment, | ||
| onClose = _ref7.onClose, | ||
| onLoadError = _ref7.onLoadError, | ||
| onLoaderStart = _ref7.onLoaderStart; | ||
| var _useCreateComponent7 = useCreateComponent('payment-details'), | ||
| wrapper = _useCreateComponent7.wrapper, | ||
| paymentDetails = _useCreateComponent7.component; | ||
| var ConnectPaymentDetails = function ConnectPaymentDetails(_ref3) { | ||
| var payment = _ref3.payment, | ||
| onClose = _ref3.onClose, | ||
| onLoadError = _ref3.onLoadError, | ||
| onLoaderStart = _ref3.onLoaderStart; | ||
| var _useCreateComponent3 = useCreateComponent('payment-details'), | ||
| wrapper = _useCreateComponent3.wrapper, | ||
| paymentDetails = _useCreateComponent3.component; | ||
| useUpdateWithSetter(paymentDetails, payment, function (comp, val) { | ||
@@ -287,10 +212,10 @@ return comp.setPayment(val); | ||
| }; | ||
| var ConnectPaymentDisputes = function ConnectPaymentDisputes(_ref8) { | ||
| var payment = _ref8.payment, | ||
| onDisputesLoaded = _ref8.onDisputesLoaded, | ||
| onLoadError = _ref8.onLoadError, | ||
| onLoaderStart = _ref8.onLoaderStart; | ||
| var _useCreateComponent8 = useCreateComponent('payment-disputes'), | ||
| wrapper = _useCreateComponent8.wrapper, | ||
| component = _useCreateComponent8.component; | ||
| var ConnectPaymentDisputes = function ConnectPaymentDisputes(_ref4) { | ||
| var payment = _ref4.payment, | ||
| onDisputesLoaded = _ref4.onDisputesLoaded, | ||
| onLoadError = _ref4.onLoadError, | ||
| onLoaderStart = _ref4.onLoaderStart; | ||
| var _useCreateComponent4 = useCreateComponent('payment-disputes'), | ||
| wrapper = _useCreateComponent4.wrapper, | ||
| component = _useCreateComponent4.component; | ||
| useUpdateWithSetter(component, payment, function (comp, val) { | ||
@@ -310,8 +235,8 @@ return comp.setPayment(val); | ||
| }; | ||
| var ConnectDisputesList = function ConnectDisputesList(_ref9) { | ||
| var onLoadError = _ref9.onLoadError, | ||
| onLoaderStart = _ref9.onLoaderStart; | ||
| var _useCreateComponent9 = useCreateComponent('disputes-list'), | ||
| wrapper = _useCreateComponent9.wrapper, | ||
| component = _useCreateComponent9.component; | ||
| var ConnectDisputesList = function ConnectDisputesList(_ref5) { | ||
| var onLoadError = _ref5.onLoadError, | ||
| onLoaderStart = _ref5.onLoaderStart; | ||
| var _useCreateComponent5 = useCreateComponent('disputes-list'), | ||
| wrapper = _useCreateComponent5.wrapper, | ||
| component = _useCreateComponent5.component; | ||
| useUpdateWithSetter(component, onLoaderStart, function (comp, val) { | ||
@@ -325,15 +250,15 @@ comp.setOnLoaderStart(val); | ||
| }; | ||
| var ConnectAccountOnboarding = function ConnectAccountOnboarding(_ref10) { | ||
| var onExit = _ref10.onExit, | ||
| recipientTermsOfServiceUrl = _ref10.recipientTermsOfServiceUrl, | ||
| fullTermsOfServiceUrl = _ref10.fullTermsOfServiceUrl, | ||
| privacyPolicyUrl = _ref10.privacyPolicyUrl, | ||
| skipTermsOfServiceCollection = _ref10.skipTermsOfServiceCollection, | ||
| collectionOptions = _ref10.collectionOptions, | ||
| onLoadError = _ref10.onLoadError, | ||
| onLoaderStart = _ref10.onLoaderStart, | ||
| onStepChange = _ref10.onStepChange; | ||
| var _useCreateComponent10 = useCreateComponent('account-onboarding'), | ||
| wrapper = _useCreateComponent10.wrapper, | ||
| onboarding = _useCreateComponent10.component; | ||
| var ConnectAccountOnboarding = function ConnectAccountOnboarding(_ref6) { | ||
| var onExit = _ref6.onExit, | ||
| recipientTermsOfServiceUrl = _ref6.recipientTermsOfServiceUrl, | ||
| fullTermsOfServiceUrl = _ref6.fullTermsOfServiceUrl, | ||
| privacyPolicyUrl = _ref6.privacyPolicyUrl, | ||
| skipTermsOfServiceCollection = _ref6.skipTermsOfServiceCollection, | ||
| collectionOptions = _ref6.collectionOptions, | ||
| onLoadError = _ref6.onLoadError, | ||
| onLoaderStart = _ref6.onLoaderStart, | ||
| onStepChange = _ref6.onStepChange; | ||
| var _useCreateComponent6 = useCreateComponent('account-onboarding'), | ||
| wrapper = _useCreateComponent6.wrapper, | ||
| onboarding = _useCreateComponent6.component; | ||
| useUpdateWithSetter(onboarding, recipientTermsOfServiceUrl, function (comp, val) { | ||
@@ -368,27 +293,9 @@ return comp.setRecipientTermsOfServiceUrl(val); | ||
| }; | ||
| var ConnectPaymentMethodSettings = function ConnectPaymentMethodSettings(_ref11) { | ||
| var paymentMethodConfiguration = _ref11.paymentMethodConfiguration, | ||
| onLoadError = _ref11.onLoadError, | ||
| onLoaderStart = _ref11.onLoaderStart; | ||
| var _useCreateComponent11 = useCreateComponent('payment-method-settings'), | ||
| wrapper = _useCreateComponent11.wrapper, | ||
| paymentMethodSettings = _useCreateComponent11.component; | ||
| useUpdateWithSetter(paymentMethodSettings, paymentMethodConfiguration, function (comp, val) { | ||
| return comp.setPaymentMethodConfiguration(val); | ||
| }); | ||
| useUpdateWithSetter(paymentMethodSettings, onLoaderStart, function (comp, val) { | ||
| comp.setOnLoaderStart(val); | ||
| }); | ||
| useUpdateWithSetter(paymentMethodSettings, onLoadError, function (comp, val) { | ||
| comp.setOnLoadError(val); | ||
| }); | ||
| return wrapper; | ||
| }; | ||
| var ConnectAccountManagement = function ConnectAccountManagement(_ref12) { | ||
| var collectionOptions = _ref12.collectionOptions, | ||
| onLoadError = _ref12.onLoadError, | ||
| onLoaderStart = _ref12.onLoaderStart; | ||
| var _useCreateComponent12 = useCreateComponent('account-management'), | ||
| wrapper = _useCreateComponent12.wrapper, | ||
| accountManagement = _useCreateComponent12.component; | ||
| var ConnectAccountManagement = function ConnectAccountManagement(_ref7) { | ||
| var collectionOptions = _ref7.collectionOptions, | ||
| onLoadError = _ref7.onLoadError, | ||
| onLoaderStart = _ref7.onLoaderStart; | ||
| var _useCreateComponent7 = useCreateComponent('account-management'), | ||
| wrapper = _useCreateComponent7.wrapper, | ||
| accountManagement = _useCreateComponent7.component; | ||
| useUpdateWithSetter(accountManagement, collectionOptions, function (comp, val) { | ||
@@ -405,24 +312,10 @@ return comp.setCollectionOptions(val); | ||
| }; | ||
| var ConnectInstantPayouts = function ConnectInstantPayouts(_ref13) { | ||
| var onLoadError = _ref13.onLoadError, | ||
| onLoaderStart = _ref13.onLoaderStart; | ||
| var _useCreateComponent13 = useCreateComponent('instant-payouts'), | ||
| wrapper = _useCreateComponent13.wrapper, | ||
| instantPayouts = _useCreateComponent13.component; | ||
| useUpdateWithSetter(instantPayouts, onLoaderStart, function (comp, val) { | ||
| comp.setOnLoaderStart(val); | ||
| }); | ||
| useUpdateWithSetter(instantPayouts, onLoadError, function (comp, val) { | ||
| comp.setOnLoadError(val); | ||
| }); | ||
| return wrapper; | ||
| }; | ||
| var ConnectNotificationBanner = function ConnectNotificationBanner(_ref14) { | ||
| var collectionOptions = _ref14.collectionOptions, | ||
| onNotificationsChange = _ref14.onNotificationsChange, | ||
| onLoadError = _ref14.onLoadError, | ||
| onLoaderStart = _ref14.onLoaderStart; | ||
| var _useCreateComponent14 = useCreateComponent('notification-banner'), | ||
| wrapper = _useCreateComponent14.wrapper, | ||
| notificationBanner = _useCreateComponent14.component; | ||
| var ConnectNotificationBanner = function ConnectNotificationBanner(_ref8) { | ||
| var collectionOptions = _ref8.collectionOptions, | ||
| onNotificationsChange = _ref8.onNotificationsChange, | ||
| onLoadError = _ref8.onLoadError, | ||
| onLoaderStart = _ref8.onLoaderStart; | ||
| var _useCreateComponent8 = useCreateComponent('notification-banner'), | ||
| wrapper = _useCreateComponent8.wrapper, | ||
| notificationBanner = _useCreateComponent8.component; | ||
| useUpdateWithSetter(notificationBanner, collectionOptions, function (comp, val) { | ||
@@ -442,12 +335,12 @@ return comp.setCollectionOptions(val); | ||
| }; | ||
| var ConnectIssuingCard = function ConnectIssuingCard(_ref15) { | ||
| var defaultCard = _ref15.defaultCard, | ||
| cardSwitching = _ref15.cardSwitching, | ||
| showSpendControls = _ref15.showSpendControls, | ||
| fetchEphemeralKey = _ref15.fetchEphemeralKey, | ||
| onLoadError = _ref15.onLoadError, | ||
| onLoaderStart = _ref15.onLoaderStart; | ||
| var _useCreateComponent15 = useCreateComponent('issuing-card'), | ||
| wrapper = _useCreateComponent15.wrapper, | ||
| issuingCard = _useCreateComponent15.component; | ||
| var ConnectIssuingCard = function ConnectIssuingCard(_ref9) { | ||
| var defaultCard = _ref9.defaultCard, | ||
| cardSwitching = _ref9.cardSwitching, | ||
| showSpendControls = _ref9.showSpendControls, | ||
| fetchEphemeralKey = _ref9.fetchEphemeralKey, | ||
| onLoadError = _ref9.onLoadError, | ||
| onLoaderStart = _ref9.onLoaderStart; | ||
| var _useCreateComponent9 = useCreateComponent('issuing-card'), | ||
| wrapper = _useCreateComponent9.wrapper, | ||
| issuingCard = _useCreateComponent9.component; | ||
| useUpdateWithSetter(issuingCard, defaultCard, function (comp, val) { | ||
@@ -473,11 +366,11 @@ return comp.setDefaultCard(val); | ||
| }; | ||
| var ConnectIssuingCardsList = function ConnectIssuingCardsList(_ref16) { | ||
| var showSpendControls = _ref16.showSpendControls, | ||
| issuingProgram = _ref16.issuingProgram, | ||
| fetchEphemeralKey = _ref16.fetchEphemeralKey, | ||
| onLoadError = _ref16.onLoadError, | ||
| onLoaderStart = _ref16.onLoaderStart; | ||
| var _useCreateComponent16 = useCreateComponent('issuing-cards-list'), | ||
| wrapper = _useCreateComponent16.wrapper, | ||
| issuingCardsList = _useCreateComponent16.component; | ||
| var ConnectIssuingCardsList = function ConnectIssuingCardsList(_ref10) { | ||
| var showSpendControls = _ref10.showSpendControls, | ||
| issuingProgram = _ref10.issuingProgram, | ||
| fetchEphemeralKey = _ref10.fetchEphemeralKey, | ||
| onLoadError = _ref10.onLoadError, | ||
| onLoaderStart = _ref10.onLoaderStart; | ||
| var _useCreateComponent10 = useCreateComponent('issuing-cards-list'), | ||
| wrapper = _useCreateComponent10.wrapper, | ||
| issuingCardsList = _useCreateComponent10.component; | ||
| useUpdateWithSetter(issuingCardsList, showSpendControls, function (comp, val) { | ||
@@ -500,9 +393,9 @@ return comp.setShowSpendControls(val); | ||
| }; | ||
| var ConnectFinancialAccount = function ConnectFinancialAccount(_ref17) { | ||
| var financialAccount = _ref17.financialAccount, | ||
| onLoadError = _ref17.onLoadError, | ||
| onLoaderStart = _ref17.onLoaderStart; | ||
| var _useCreateComponent17 = useCreateComponent('financial-account'), | ||
| wrapper = _useCreateComponent17.wrapper, | ||
| financialAccountComponent = _useCreateComponent17.component; | ||
| var ConnectFinancialAccount = function ConnectFinancialAccount(_ref11) { | ||
| var financialAccount = _ref11.financialAccount, | ||
| onLoadError = _ref11.onLoadError, | ||
| onLoaderStart = _ref11.onLoaderStart; | ||
| var _useCreateComponent11 = useCreateComponent('financial-account'), | ||
| wrapper = _useCreateComponent11.wrapper, | ||
| financialAccountComponent = _useCreateComponent11.component; | ||
| useUpdateWithSetter(financialAccountComponent, financialAccount, function (comp, val) { | ||
@@ -519,9 +412,9 @@ return comp.setFinancialAccount(val); | ||
| }; | ||
| var ConnectFinancialAccountTransactions = function ConnectFinancialAccountTransactions(_ref18) { | ||
| var financialAccount = _ref18.financialAccount, | ||
| onLoadError = _ref18.onLoadError, | ||
| onLoaderStart = _ref18.onLoaderStart; | ||
| var _useCreateComponent18 = useCreateComponent('financial-account-transactions'), | ||
| wrapper = _useCreateComponent18.wrapper, | ||
| financialAccountTransactionsComponent = _useCreateComponent18.component; | ||
| var ConnectFinancialAccountTransactions = function ConnectFinancialAccountTransactions(_ref12) { | ||
| var financialAccount = _ref12.financialAccount, | ||
| onLoadError = _ref12.onLoadError, | ||
| onLoaderStart = _ref12.onLoaderStart; | ||
| var _useCreateComponent12 = useCreateComponent('financial-account-transactions'), | ||
| wrapper = _useCreateComponent12.wrapper, | ||
| financialAccountTransactionsComponent = _useCreateComponent12.component; | ||
| useUpdateWithSetter(financialAccountTransactionsComponent, financialAccount, function (comp, val) { | ||
@@ -538,16 +431,12 @@ return comp.setFinancialAccount(val); | ||
| }; | ||
| var ConnectRecipients = function ConnectRecipients(_ref19) { | ||
| var dataSource = _ref19.dataSource, | ||
| onLoadError = _ref19.onLoadError, | ||
| onLoaderStart = _ref19.onLoaderStart; | ||
| var _useCreateComponent19 = useCreateComponent('recipients'), | ||
| wrapper = _useCreateComponent19.wrapper, | ||
| recipientsComponent = _useCreateComponent19.component; | ||
| useUpdateWithSetter(recipientsComponent, dataSource, function (comp, val) { | ||
| return comp.setDataSource(val); | ||
| }); | ||
| useUpdateWithSetter(recipientsComponent, onLoaderStart, function (comp, val) { | ||
| var ConnectDocuments = function ConnectDocuments(_ref13) { | ||
| var onLoadError = _ref13.onLoadError, | ||
| onLoaderStart = _ref13.onLoaderStart; | ||
| var _useCreateComponent13 = useCreateComponent('documents'), | ||
| wrapper = _useCreateComponent13.wrapper, | ||
| documents = _useCreateComponent13.component; | ||
| useUpdateWithSetter(documents, onLoaderStart, function (comp, val) { | ||
| comp.setOnLoaderStart(val); | ||
| }); | ||
| useUpdateWithSetter(recipientsComponent, onLoadError, function (comp, val) { | ||
| useUpdateWithSetter(documents, onLoadError, function (comp, val) { | ||
| comp.setOnLoadError(val); | ||
@@ -557,12 +446,12 @@ }); | ||
| }; | ||
| var ConnectCapitalOverview = function ConnectCapitalOverview(_ref20) { | ||
| var onLoadError = _ref20.onLoadError, | ||
| onLoaderStart = _ref20.onLoaderStart; | ||
| var _useCreateComponent20 = useCreateComponent('capital-overview'), | ||
| wrapper = _useCreateComponent20.wrapper, | ||
| capitalOverview = _useCreateComponent20.component; | ||
| useUpdateWithSetter(capitalOverview, onLoaderStart, function (comp, val) { | ||
| var ConnectPayoutsList = function ConnectPayoutsList(_ref14) { | ||
| var onLoadError = _ref14.onLoadError, | ||
| onLoaderStart = _ref14.onLoaderStart; | ||
| var _useCreateComponent14 = useCreateComponent('payouts-list'), | ||
| wrapper = _useCreateComponent14.wrapper, | ||
| payoutsList = _useCreateComponent14.component; | ||
| useUpdateWithSetter(payoutsList, onLoaderStart, function (comp, val) { | ||
| comp.setOnLoaderStart(val); | ||
| }); | ||
| useUpdateWithSetter(capitalOverview, onLoadError, function (comp, val) { | ||
| useUpdateWithSetter(payoutsList, onLoadError, function (comp, val) { | ||
| comp.setOnLoadError(val); | ||
@@ -572,32 +461,12 @@ }); | ||
| }; | ||
| var ConnectCapitalFinancing = function ConnectCapitalFinancing(_ref21) { | ||
| var defaultFinancingOffer = _ref21.defaultFinancingOffer, | ||
| showFinancingSelector = _ref21.showFinancingSelector, | ||
| howCapitalWorksUrl = _ref21.howCapitalWorksUrl, | ||
| supportUrl = _ref21.supportUrl, | ||
| onFinancingsLoaded = _ref21.onFinancingsLoaded, | ||
| onLoadError = _ref21.onLoadError, | ||
| onLoaderStart = _ref21.onLoaderStart; | ||
| var _useCreateComponent21 = useCreateComponent('capital-financing'), | ||
| wrapper = _useCreateComponent21.wrapper, | ||
| capitalFinancing = _useCreateComponent21.component; | ||
| useUpdateWithSetter(capitalFinancing, defaultFinancingOffer, function (comp, val) { | ||
| return comp.setDefaultFinancingOffer(val); | ||
| }); | ||
| useUpdateWithSetter(capitalFinancing, showFinancingSelector, function (comp, val) { | ||
| return comp.setShowFinancingSelector(val); | ||
| }); | ||
| useUpdateWithSetter(capitalFinancing, howCapitalWorksUrl, function (comp, val) { | ||
| return comp.setHowCapitalWorksUrl(val); | ||
| }); | ||
| useUpdateWithSetter(capitalFinancing, supportUrl, function (comp, val) { | ||
| return comp.setSupportUrl(val); | ||
| }); | ||
| useUpdateWithSetter(capitalFinancing, onFinancingsLoaded, function (comp, val) { | ||
| return comp.setOnFinancingsLoaded(val); | ||
| }); | ||
| useUpdateWithSetter(capitalFinancing, onLoaderStart, function (comp, val) { | ||
| var ConnectBalances = function ConnectBalances(_ref15) { | ||
| var onLoadError = _ref15.onLoadError, | ||
| onLoaderStart = _ref15.onLoaderStart; | ||
| var _useCreateComponent15 = useCreateComponent('balances'), | ||
| wrapper = _useCreateComponent15.wrapper, | ||
| balances = _useCreateComponent15.component; | ||
| useUpdateWithSetter(balances, onLoaderStart, function (comp, val) { | ||
| comp.setOnLoaderStart(val); | ||
| }); | ||
| useUpdateWithSetter(capitalFinancing, onLoadError, function (comp, val) { | ||
| useUpdateWithSetter(balances, onLoadError, function (comp, val) { | ||
| comp.setOnLoadError(val); | ||
@@ -607,126 +476,11 @@ }); | ||
| }; | ||
| var ConnectCapitalFinancingApplication = function ConnectCapitalFinancingApplication(_ref22) { | ||
| var onApplicationSubmitted = _ref22.onApplicationSubmitted, | ||
| onApplicationStepChange = _ref22.onApplicationStepChange, | ||
| privacyPolicyUrl = _ref22.privacyPolicyUrl, | ||
| howCapitalWorksUrl = _ref22.howCapitalWorksUrl, | ||
| onLoadError = _ref22.onLoadError, | ||
| onLoaderStart = _ref22.onLoaderStart; | ||
| var _useCreateComponent22 = useCreateComponent('capital-financing-application'), | ||
| wrapper = _useCreateComponent22.wrapper, | ||
| capitalFinancingApplication = _useCreateComponent22.component; | ||
| useUpdateWithSetter(capitalFinancingApplication, onApplicationSubmitted, function (comp, val) { | ||
| return comp.setOnApplicationSubmitted(val); | ||
| }); | ||
| useUpdateWithSetter(capitalFinancingApplication, onApplicationStepChange, function (comp, val) { | ||
| return comp.setOnApplicationStepChange(val); | ||
| }); | ||
| useUpdateWithSetter(capitalFinancingApplication, privacyPolicyUrl, function (comp, val) { | ||
| return comp.setPrivacyPolicyUrl(val); | ||
| }); | ||
| useUpdateWithSetter(capitalFinancingApplication, howCapitalWorksUrl, function (comp, val) { | ||
| return comp.setHowCapitalWorksUrl(val); | ||
| }); | ||
| useUpdateWithSetter(capitalFinancingApplication, onLoaderStart, function (comp, val) { | ||
| comp.setOnLoaderStart(val); | ||
| }); | ||
| useUpdateWithSetter(capitalFinancingApplication, onLoadError, function (comp, val) { | ||
| comp.setOnLoadError(val); | ||
| }); | ||
| return wrapper; | ||
| }; | ||
| var ConnectCapitalFinancingPromotion = function ConnectCapitalFinancingPromotion(_ref23) { | ||
| var layout = _ref23.layout, | ||
| onApplicationSubmitted = _ref23.onApplicationSubmitted, | ||
| onEligibleFinancingOfferLoaded = _ref23.onEligibleFinancingOfferLoaded, | ||
| onApplicationStepChange = _ref23.onApplicationStepChange, | ||
| privacyPolicyUrl = _ref23.privacyPolicyUrl, | ||
| howCapitalWorksUrl = _ref23.howCapitalWorksUrl, | ||
| eligibilityCriteriaUrl = _ref23.eligibilityCriteriaUrl, | ||
| onLoadError = _ref23.onLoadError, | ||
| onLoaderStart = _ref23.onLoaderStart; | ||
| var _useCreateComponent23 = useCreateComponent('capital-financing-promotion'), | ||
| wrapper = _useCreateComponent23.wrapper, | ||
| capitalPromotion = _useCreateComponent23.component; | ||
| useUpdateWithSetter(capitalPromotion, layout, function (comp, val) { | ||
| return comp.setLayout(val); | ||
| }); | ||
| useUpdateWithSetter(capitalPromotion, privacyPolicyUrl, function (comp, val) { | ||
| return comp.setPrivacyPolicyUrl(val); | ||
| }); | ||
| useUpdateWithSetter(capitalPromotion, howCapitalWorksUrl, function (comp, val) { | ||
| return comp.setHowCapitalWorksUrl(val); | ||
| }); | ||
| useUpdateWithSetter(capitalPromotion, eligibilityCriteriaUrl, function (comp, val) { | ||
| return comp.setEligibilityCriteriaUrl(val); | ||
| }); | ||
| useUpdateWithSetter(capitalPromotion, onApplicationSubmitted, function (comp, val) { | ||
| return comp.setOnApplicationSubmitted(val); | ||
| }); | ||
| useUpdateWithSetter(capitalPromotion, onApplicationStepChange, function (comp, val) { | ||
| return comp.setOnApplicationStepChange(val); | ||
| }); | ||
| useUpdateWithSetter(capitalPromotion, onEligibleFinancingOfferLoaded, function (comp, val) { | ||
| return comp.setOnEligibleFinancingOfferLoaded(val); | ||
| }); | ||
| useUpdateWithSetter(capitalPromotion, onLoaderStart, function (comp, val) { | ||
| comp.setOnLoaderStart(val); | ||
| }); | ||
| useUpdateWithSetter(capitalPromotion, onLoadError, function (comp, val) { | ||
| comp.setOnLoadError(val); | ||
| }); | ||
| return wrapper; | ||
| }; | ||
| var ConnectDocuments = function ConnectDocuments(_ref24) { | ||
| var onLoadError = _ref24.onLoadError, | ||
| onLoaderStart = _ref24.onLoaderStart; | ||
| var _useCreateComponent24 = useCreateComponent('documents'), | ||
| wrapper = _useCreateComponent24.wrapper, | ||
| documents = _useCreateComponent24.component; | ||
| useUpdateWithSetter(documents, onLoaderStart, function (comp, val) { | ||
| comp.setOnLoaderStart(val); | ||
| }); | ||
| useUpdateWithSetter(documents, onLoadError, function (comp, val) { | ||
| comp.setOnLoadError(val); | ||
| }); | ||
| return wrapper; | ||
| }; | ||
| var ConnectProductTaxCodeSelector = function ConnectProductTaxCodeSelector(_ref25) { | ||
| var onLoadError = _ref25.onLoadError, | ||
| onLoaderStart = _ref25.onLoaderStart, | ||
| onTaxCodeSelect = _ref25.onTaxCodeSelect, | ||
| hideDescription = _ref25.hideDescription, | ||
| disabled = _ref25.disabled, | ||
| initialTaxCode = _ref25.initialTaxCode; | ||
| var _useCreateComponent25 = useCreateComponent('product-tax-code-selector'), | ||
| wrapper = _useCreateComponent25.wrapper, | ||
| productTaxCodeSelector = _useCreateComponent25.component; | ||
| useUpdateWithSetter(productTaxCodeSelector, onLoaderStart, function (comp, val) { | ||
| comp.setOnLoaderStart(val); | ||
| }); | ||
| useUpdateWithSetter(productTaxCodeSelector, onLoadError, function (comp, val) { | ||
| comp.setOnLoadError(val); | ||
| }); | ||
| useUpdateWithSetter(productTaxCodeSelector, onTaxCodeSelect, function (comp, val) { | ||
| comp.setOnTaxCodeSelect(val); | ||
| }); | ||
| useUpdateWithSetter(productTaxCodeSelector, hideDescription, function (comp, val) { | ||
| comp.setHideDescription(val); | ||
| }); | ||
| useUpdateWithSetter(productTaxCodeSelector, disabled, function (comp, val) { | ||
| comp.setDisabled(val); | ||
| }); | ||
| useUpdateWithSetter(productTaxCodeSelector, initialTaxCode, function (comp, val) { | ||
| comp.setInitialTaxCode(val); | ||
| }); | ||
| return wrapper; | ||
| }; | ||
| var ConnectTaxRegistrations = function ConnectTaxRegistrations(_ref26) { | ||
| var onLoadError = _ref26.onLoadError, | ||
| onLoaderStart = _ref26.onLoaderStart, | ||
| displayCountries = _ref26.displayCountries, | ||
| onAfterTaxRegistrationAdded = _ref26.onAfterTaxRegistrationAdded; | ||
| var _useCreateComponent26 = useCreateComponent('tax-registrations'), | ||
| wrapper = _useCreateComponent26.wrapper, | ||
| taxRegistrations = _useCreateComponent26.component; | ||
| var ConnectTaxRegistrations = function ConnectTaxRegistrations(_ref16) { | ||
| var onLoadError = _ref16.onLoadError, | ||
| onLoaderStart = _ref16.onLoaderStart, | ||
| displayCountries = _ref16.displayCountries, | ||
| onAfterTaxRegistrationAdded = _ref16.onAfterTaxRegistrationAdded, | ||
| onAfterTaxRegistrationExpired = _ref16.onAfterTaxRegistrationExpired; | ||
| var _useCreateComponent16 = useCreateComponent('tax-registrations'), | ||
| wrapper = _useCreateComponent16.wrapper, | ||
| taxRegistrations = _useCreateComponent16.component; | ||
| useUpdateWithSetter(taxRegistrations, onLoaderStart, function (comp, val) { | ||
@@ -744,27 +498,16 @@ comp.setOnLoaderStart(val); | ||
| }); | ||
| return wrapper; | ||
| }; | ||
| var ConnectExportTaxTransactions = function ConnectExportTaxTransactions(_ref27) { | ||
| var onLoadError = _ref27.onLoadError, | ||
| onLoaderStart = _ref27.onLoaderStart; | ||
| var _useCreateComponent27 = useCreateComponent('export-tax-transactions'), | ||
| wrapper = _useCreateComponent27.wrapper, | ||
| exportTaxTransactions = _useCreateComponent27.component; | ||
| useUpdateWithSetter(exportTaxTransactions, onLoaderStart, function (comp, val) { | ||
| comp.setOnLoaderStart(val); | ||
| useUpdateWithSetter(taxRegistrations, onAfterTaxRegistrationExpired, function (comp, val) { | ||
| comp.setOnAfterTaxRegistrationExpired(val); | ||
| }); | ||
| useUpdateWithSetter(exportTaxTransactions, onLoadError, function (comp, val) { | ||
| comp.setOnLoadError(val); | ||
| }); | ||
| return wrapper; | ||
| }; | ||
| var ConnectTaxSettings = function ConnectTaxSettings(_ref28) { | ||
| var onLoadError = _ref28.onLoadError, | ||
| onLoaderStart = _ref28.onLoaderStart, | ||
| hideProductTaxCodeSelector = _ref28.hideProductTaxCodeSelector, | ||
| displayHeadOfficeCountries = _ref28.displayHeadOfficeCountries, | ||
| onTaxSettingsUpdated = _ref28.onTaxSettingsUpdated; | ||
| var _useCreateComponent28 = useCreateComponent('tax-settings'), | ||
| wrapper = _useCreateComponent28.wrapper, | ||
| taxSettings = _useCreateComponent28.component; | ||
| var ConnectTaxSettings = function ConnectTaxSettings(_ref17) { | ||
| var onLoadError = _ref17.onLoadError, | ||
| onLoaderStart = _ref17.onLoaderStart, | ||
| hideProductTaxCodeSelector = _ref17.hideProductTaxCodeSelector, | ||
| displayHeadOfficeCountries = _ref17.displayHeadOfficeCountries, | ||
| onTaxSettingsUpdated = _ref17.onTaxSettingsUpdated; | ||
| var _useCreateComponent17 = useCreateComponent('tax-settings'), | ||
| wrapper = _useCreateComponent17.wrapper, | ||
| taxSettings = _useCreateComponent17.component; | ||
| useUpdateWithSetter(taxSettings, onLoaderStart, function (comp, val) { | ||
@@ -787,58 +530,10 @@ comp.setOnLoaderStart(val); | ||
| }; | ||
| var ConnectTaxThresholdMonitoring = function ConnectTaxThresholdMonitoring(_ref29) { | ||
| var onLoadError = _ref29.onLoadError, | ||
| onLoaderStart = _ref29.onLoaderStart, | ||
| displayCountries = _ref29.displayCountries; | ||
| var _useCreateComponent29 = useCreateComponent('tax-threshold-monitoring'), | ||
| wrapper = _useCreateComponent29.wrapper, | ||
| taxSettings = _useCreateComponent29.component; | ||
| useUpdateWithSetter(taxSettings, onLoaderStart, function (comp, val) { | ||
| comp.setOnLoaderStart(val); | ||
| }); | ||
| useUpdateWithSetter(taxSettings, onLoadError, function (comp, val) { | ||
| comp.setOnLoadError(val); | ||
| }); | ||
| useUpdateWithSetter(taxSettings, displayCountries, function (comp, val) { | ||
| comp.setDisplayCountries(val); | ||
| }); | ||
| return wrapper; | ||
| }; | ||
| var ConnectReportingChart = function ConnectReportingChart(_ref30) { | ||
| var reportName = _ref30.reportName, | ||
| intervalStart = _ref30.intervalStart, | ||
| intervalEnd = _ref30.intervalEnd, | ||
| intervalType = _ref30.intervalType, | ||
| onLoadError = _ref30.onLoadError, | ||
| onLoaderStart = _ref30.onLoaderStart; | ||
| var _useCreateComponent30 = useCreateComponent('reporting-chart'), | ||
| wrapper = _useCreateComponent30.wrapper, | ||
| reportingChart = _useCreateComponent30.component; | ||
| useUpdateWithSetter(reportingChart, reportName, function (comp, val) { | ||
| return comp.setReportName(val); | ||
| }); | ||
| useUpdateWithSetter(reportingChart, intervalStart, function (comp, val) { | ||
| return comp.setIntervalStart(val); | ||
| }); | ||
| useUpdateWithSetter(reportingChart, intervalEnd, function (comp, val) { | ||
| return comp.setIntervalEnd(val); | ||
| }); | ||
| useUpdateWithSetter(reportingChart, intervalType, function (comp, val) { | ||
| return comp.setIntervalType(val); | ||
| }); | ||
| useUpdateWithSetter(reportingChart, onLoaderStart, function (comp, val) { | ||
| comp.setOnLoaderStart(val); | ||
| }); | ||
| useUpdateWithSetter(reportingChart, onLoadError, function (comp, val) { | ||
| comp.setOnLoadError(val); | ||
| }); | ||
| return wrapper; | ||
| }; | ||
| var ConnectInstantPayoutsPromotion = function ConnectInstantPayoutsPromotion(_ref31) { | ||
| var onInstantPayoutsPromotionLoaded = _ref31.onInstantPayoutsPromotionLoaded, | ||
| onInstantPayoutCreated = _ref31.onInstantPayoutCreated, | ||
| onLoadError = _ref31.onLoadError, | ||
| onLoaderStart = _ref31.onLoaderStart; | ||
| var _useCreateComponent31 = useCreateComponent('instant-payouts-promotion'), | ||
| wrapper = _useCreateComponent31.wrapper, | ||
| instantPayoutsPromotion = _useCreateComponent31.component; | ||
| var ConnectInstantPayoutsPromotion = function ConnectInstantPayoutsPromotion(_ref18) { | ||
| var onInstantPayoutsPromotionLoaded = _ref18.onInstantPayoutsPromotionLoaded, | ||
| onInstantPayoutCreated = _ref18.onInstantPayoutCreated, | ||
| onLoadError = _ref18.onLoadError, | ||
| onLoaderStart = _ref18.onLoaderStart; | ||
| var _useCreateComponent18 = useCreateComponent('instant-payouts-promotion'), | ||
| wrapper = _useCreateComponent18.wrapper, | ||
| instantPayoutsPromotion = _useCreateComponent18.component; | ||
| useUpdateWithSetter(instantPayoutsPromotion, onLoaderStart, function (comp, val) { | ||
@@ -858,10 +553,10 @@ comp.setOnLoaderStart(val); | ||
| }; | ||
| var ConnectPayoutDetails = function ConnectPayoutDetails(_ref32) { | ||
| var payout = _ref32.payout, | ||
| onClose = _ref32.onClose, | ||
| onLoadError = _ref32.onLoadError, | ||
| onLoaderStart = _ref32.onLoaderStart; | ||
| var _useCreateComponent32 = useCreateComponent('payout-details'), | ||
| wrapper = _useCreateComponent32.wrapper, | ||
| payoutDetails = _useCreateComponent32.component; | ||
| var ConnectPayoutDetails = function ConnectPayoutDetails(_ref19) { | ||
| var payout = _ref19.payout, | ||
| onClose = _ref19.onClose, | ||
| onLoadError = _ref19.onLoadError, | ||
| onLoaderStart = _ref19.onLoaderStart; | ||
| var _useCreateComponent19 = useCreateComponent('payout-details'), | ||
| wrapper = _useCreateComponent19.wrapper, | ||
| payoutDetails = _useCreateComponent19.component; | ||
| useUpdateWithSetter(payoutDetails, payout, function (comp, val) { | ||
@@ -881,2 +576,34 @@ return comp.setPayout(val); | ||
| }; | ||
| var ConnectBalanceReport = function ConnectBalanceReport(_ref20) { | ||
| var onLoadError = _ref20.onLoadError, | ||
| onLoaderStart = _ref20.onLoaderStart; | ||
| var _useCreateComponent20 = useCreateComponent('balance-report'), | ||
| wrapper = _useCreateComponent20.wrapper, | ||
| balanceReport = _useCreateComponent20.component; | ||
| useUpdateWithSetter(balanceReport, onLoaderStart, function (comp, val) { | ||
| comp.setOnLoaderStart(val); | ||
| }); | ||
| useUpdateWithSetter(balanceReport, onLoadError, function (comp, val) { | ||
| comp.setOnLoadError(val); | ||
| }); | ||
| return wrapper; | ||
| }; | ||
| var ConnectPayoutReconciliationReport = function ConnectPayoutReconciliationReport(_ref21) { | ||
| var onReportAvailabilityLoaded = _ref21.onReportAvailabilityLoaded, | ||
| onLoadError = _ref21.onLoadError, | ||
| onLoaderStart = _ref21.onLoaderStart; | ||
| var _useCreateComponent21 = useCreateComponent('payout-reconciliation-report'), | ||
| wrapper = _useCreateComponent21.wrapper, | ||
| payoutReconciliationReport = _useCreateComponent21.component; | ||
| useUpdateWithSetter(payoutReconciliationReport, onReportAvailabilityLoaded, function (comp, val) { | ||
| comp.setOnReportAvailabilityLoaded(val); | ||
| }); | ||
| useUpdateWithSetter(payoutReconciliationReport, onLoaderStart, function (comp, val) { | ||
| comp.setOnLoaderStart(val); | ||
| }); | ||
| useUpdateWithSetter(payoutReconciliationReport, onLoadError, function (comp, val) { | ||
| comp.setOnLoadError(val); | ||
| }); | ||
| return wrapper; | ||
| }; | ||
@@ -924,16 +651,9 @@ /** | ||
| exports.ConnectAccountOnboarding = ConnectAccountOnboarding; | ||
| exports.ConnectAppInstall = ConnectAppInstall; | ||
| exports.ConnectAppViewport = ConnectAppViewport; | ||
| exports.ConnectBalanceReport = ConnectBalanceReport; | ||
| exports.ConnectBalances = ConnectBalances; | ||
| exports.ConnectCapitalFinancing = ConnectCapitalFinancing; | ||
| exports.ConnectCapitalFinancingApplication = ConnectCapitalFinancingApplication; | ||
| exports.ConnectCapitalFinancingPromotion = ConnectCapitalFinancingPromotion; | ||
| exports.ConnectCapitalOverview = ConnectCapitalOverview; | ||
| exports.ConnectComponentsProvider = ConnectComponentsProvider; | ||
| exports.ConnectDisputesList = ConnectDisputesList; | ||
| exports.ConnectDocuments = ConnectDocuments; | ||
| exports.ConnectExportTaxTransactions = ConnectExportTaxTransactions; | ||
| exports.ConnectFinancialAccount = ConnectFinancialAccount; | ||
| exports.ConnectFinancialAccountTransactions = ConnectFinancialAccountTransactions; | ||
| exports.ConnectInstantPayouts = ConnectInstantPayouts; | ||
| exports.ConnectInstantPayoutsPromotion = ConnectInstantPayoutsPromotion; | ||
@@ -945,13 +665,9 @@ exports.ConnectIssuingCard = ConnectIssuingCard; | ||
| exports.ConnectPaymentDisputes = ConnectPaymentDisputes; | ||
| exports.ConnectPaymentMethodSettings = ConnectPaymentMethodSettings; | ||
| exports.ConnectPayments = ConnectPayments; | ||
| exports.ConnectPayoutDetails = ConnectPayoutDetails; | ||
| exports.ConnectPayoutReconciliationReport = ConnectPayoutReconciliationReport; | ||
| exports.ConnectPayouts = ConnectPayouts; | ||
| exports.ConnectPayoutsList = ConnectPayoutsList; | ||
| exports.ConnectProductTaxCodeSelector = ConnectProductTaxCodeSelector; | ||
| exports.ConnectRecipients = ConnectRecipients; | ||
| exports.ConnectReportingChart = ConnectReportingChart; | ||
| exports.ConnectTaxRegistrations = ConnectTaxRegistrations; | ||
| exports.ConnectTaxSettings = ConnectTaxSettings; | ||
| exports.ConnectTaxThresholdMonitoring = ConnectTaxThresholdMonitoring; | ||
| exports.useAttachAttribute = useAttachAttribute; | ||
@@ -958,0 +674,0 @@ exports.useAttachEvent = useAttachEvent; |
+4
-4
| { | ||
| "name": "@stripe/react-connect-js", | ||
| "version": "3.3.36-preview-1", | ||
| "version": "3.3.36", | ||
| "description": "React components for Connect.js and Connect embedded components", | ||
@@ -54,3 +54,3 @@ "main": "dist/react-connect.js", | ||
| "@rollup/plugin-replace": "^2.3.1", | ||
| "@stripe/connect-js": "3.3.37-preview-1", | ||
| "@stripe/connect-js": "3.3.39", | ||
| "@types/jest": "^24.0.25", | ||
@@ -80,3 +80,3 @@ "@types/react": "^16.8.0", | ||
| "rimraf": "^2.6.2", | ||
| "rollup": "~2.66", | ||
| "rollup": "~2.80", | ||
| "rollup-plugin-babel": "^4.4.0", | ||
@@ -95,3 +95,3 @@ "rollup-plugin-commonjs": "^10.1.0", | ||
| "peerDependencies": { | ||
| "@stripe/connect-js": ">=3.3.37-preview-1", | ||
| "@stripe/connect-js": ">=3.3.39", | ||
| "react": ">=16.8.0", | ||
@@ -98,0 +98,0 @@ "react-dom": ">=16.8.0" |
+98
-477
@@ -0,1 +1,3 @@ | ||
| import type * as React from 'react'; | ||
| import type {FetchEphemeralKeyFunction} from './types'; | ||
| import {useCreateComponent} from './useCreateComponent'; | ||
@@ -5,18 +7,10 @@ import {useUpdateWithSetter} from './utils/useUpdateWithSetter'; | ||
| CollectionOptions, | ||
| FetchEphemeralKeyFunction, | ||
| FinancingProductType, | ||
| FinancingPromotionLayoutType, | ||
| } from './types'; | ||
| import type { | ||
| LoadError, | ||
| LoaderStart, | ||
| NotificationCount, | ||
| InstallState, | ||
| StepChange, | ||
| IntervalType, | ||
| ReportName, | ||
| RecipientDataSource, | ||
| PaymentsListDefaultFilters | ||
| PaymentsListDefaultFilters, | ||
| } from '@stripe/connect-js'; | ||
| export type {CollectionOptions}; | ||
| export type CommonComponentProps = { | ||
@@ -27,71 +21,2 @@ onLoaderStart?: ({elementTagName}: LoaderStart) => void; | ||
| export const ConnectAppInstall = ({ | ||
| app, | ||
| onAppInstallStateFetch, | ||
| onAppInstallStateChange, | ||
| onLoadError, | ||
| onLoaderStart, | ||
| }: { | ||
| app: string; | ||
| onAppInstallStateFetch?: (({appId, state}: InstallState) => void) | undefined; | ||
| onAppInstallStateChange?: | ||
| | (({appId, state}: InstallState) => void) | ||
| | undefined; | ||
| } & CommonComponentProps): JSX.Element | null => { | ||
| const {wrapper, component: appInstall} = useCreateComponent('app-install'); | ||
| useUpdateWithSetter(appInstall, app, (comp, val) => comp.setApp(val)); | ||
| useUpdateWithSetter(appInstall, onAppInstallStateFetch, (comp, val) => | ||
| comp.setOnAppInstallStateFetched(val) | ||
| ); | ||
| useUpdateWithSetter(appInstall, onAppInstallStateChange, (comp, val) => | ||
| comp.setOnAppInstallStateChanged(val) | ||
| ); | ||
| useUpdateWithSetter(appInstall, onLoaderStart, (comp, val) => { | ||
| comp.setOnLoaderStart(val); | ||
| }); | ||
| useUpdateWithSetter(appInstall, onLoadError, (comp, val) => { | ||
| comp.setOnLoadError(val); | ||
| }); | ||
| return wrapper; | ||
| }; | ||
| export const ConnectAppViewport = ({ | ||
| app, | ||
| appData, | ||
| onLoadError, | ||
| onLoaderStart, | ||
| }: { | ||
| app: string; | ||
| appData?: Record<string, string>; | ||
| } & CommonComponentProps): JSX.Element | null => { | ||
| const {wrapper, component: appViewport} = useCreateComponent('app-viewport'); | ||
| useUpdateWithSetter(appViewport, app, (comp, val) => comp.setApp(val)); | ||
| useUpdateWithSetter(appViewport, appData, (comp, val) => | ||
| comp.setAppData(val) | ||
| ); | ||
| useUpdateWithSetter(appViewport, onLoaderStart, (comp, val) => { | ||
| comp.setOnLoaderStart(val); | ||
| }); | ||
| useUpdateWithSetter(appViewport, onLoadError, (comp, val) => { | ||
| comp.setOnLoadError(val); | ||
| }); | ||
| return wrapper; | ||
| }; | ||
| export const ConnectBalances = ({ | ||
| onLoadError, | ||
| onLoaderStart, | ||
| }: CommonComponentProps): JSX.Element => { | ||
| const {wrapper, component: balances} = useCreateComponent('balances'); | ||
| useUpdateWithSetter(balances, onLoaderStart, (comp, val) => { | ||
| comp.setOnLoaderStart(val); | ||
| }); | ||
| useUpdateWithSetter(balances, onLoadError, (comp, val) => { | ||
| comp.setOnLoadError(val); | ||
| }); | ||
| return wrapper; | ||
| }; | ||
| export const ConnectPayments = ({ | ||
@@ -101,3 +26,5 @@ defaultFilters, | ||
| onLoaderStart, | ||
| }: {defaultFilters?: PaymentsListDefaultFilters} & CommonComponentProps): JSX.Element => { | ||
| }: { | ||
| defaultFilters?: PaymentsListDefaultFilters; | ||
| } & CommonComponentProps): React.JSX.Element => { | ||
| const {wrapper, component: payments} = useCreateComponent('payments'); | ||
@@ -121,3 +48,3 @@ | ||
| onLoaderStart, | ||
| }: CommonComponentProps): JSX.Element => { | ||
| }: CommonComponentProps): React.JSX.Element => { | ||
| const {wrapper, component: payouts} = useCreateComponent('payouts'); | ||
@@ -135,18 +62,2 @@ | ||
| export const ConnectPayoutsList = ({ | ||
| onLoadError, | ||
| onLoaderStart, | ||
| }: CommonComponentProps): JSX.Element => { | ||
| const {wrapper, component: payoutsList} = useCreateComponent('payouts-list'); | ||
| useUpdateWithSetter(payoutsList, onLoaderStart, (comp, val) => { | ||
| comp.setOnLoaderStart(val); | ||
| }); | ||
| useUpdateWithSetter(payoutsList, onLoadError, (comp, val) => { | ||
| comp.setOnLoadError(val); | ||
| }); | ||
| return wrapper; | ||
| }; | ||
| export const ConnectPaymentDetails = ({ | ||
@@ -163,3 +74,3 @@ payment, | ||
| onClose: () => void; | ||
| } & CommonComponentProps): JSX.Element | null => { | ||
| } & CommonComponentProps): React.JSX.Element | null => { | ||
| const {wrapper, component: paymentDetails} = | ||
@@ -194,9 +105,6 @@ useCreateComponent('payment-details'); | ||
| onDisputesLoaded?: ({total}: {total: number}) => void; | ||
| } & CommonComponentProps): JSX.Element | null => { | ||
| const {wrapper, component} = | ||
| useCreateComponent('payment-disputes'); | ||
| } & CommonComponentProps): React.JSX.Element | null => { | ||
| const {wrapper, component} = useCreateComponent('payment-disputes'); | ||
| useUpdateWithSetter(component, payment, (comp, val) => | ||
| comp.setPayment(val) | ||
| ); | ||
| useUpdateWithSetter(component, payment, (comp, val) => comp.setPayment(val)); | ||
| useUpdateWithSetter(component, onDisputesLoaded, (comp, val) => | ||
@@ -217,5 +125,4 @@ comp.setOnDisputesLoaded(val) | ||
| onLoaderStart, | ||
| }: CommonComponentProps): JSX.Element | null => { | ||
| const {wrapper, component} = | ||
| useCreateComponent('disputes-list'); | ||
| }: CommonComponentProps): React.JSX.Element | null => { | ||
| const {wrapper, component} = useCreateComponent('disputes-list'); | ||
@@ -249,3 +156,3 @@ useUpdateWithSetter(component, onLoaderStart, (comp, val) => { | ||
| collectionOptions?: CollectionOptions; | ||
| } & CommonComponentProps): JSX.Element | null => { | ||
| } & CommonComponentProps): React.JSX.Element | null => { | ||
| const {wrapper, component: onboarding} = | ||
@@ -283,29 +190,2 @@ useCreateComponent('account-onboarding'); | ||
| export const ConnectPaymentMethodSettings = ({ | ||
| paymentMethodConfiguration, | ||
| onLoadError, | ||
| onLoaderStart, | ||
| }: { | ||
| paymentMethodConfiguration?: string; | ||
| } & CommonComponentProps): JSX.Element => { | ||
| const {wrapper, component: paymentMethodSettings} = useCreateComponent( | ||
| 'payment-method-settings' | ||
| ); | ||
| useUpdateWithSetter( | ||
| paymentMethodSettings, | ||
| paymentMethodConfiguration, | ||
| (comp, val) => comp.setPaymentMethodConfiguration(val) | ||
| ); | ||
| useUpdateWithSetter(paymentMethodSettings, onLoaderStart, (comp, val) => { | ||
| comp.setOnLoaderStart(val); | ||
| }); | ||
| useUpdateWithSetter(paymentMethodSettings, onLoadError, (comp, val) => { | ||
| comp.setOnLoadError(val); | ||
| }); | ||
| return wrapper; | ||
| }; | ||
| export const ConnectAccountManagement = ({ | ||
@@ -317,3 +197,3 @@ collectionOptions, | ||
| collectionOptions?: CollectionOptions; | ||
| } & CommonComponentProps): JSX.Element | null => { | ||
| } & CommonComponentProps): React.JSX.Element | null => { | ||
| const {wrapper, component: accountManagement} = | ||
@@ -335,18 +215,2 @@ useCreateComponent('account-management'); | ||
| export const ConnectInstantPayouts = ({ | ||
| onLoadError, | ||
| onLoaderStart, | ||
| }: CommonComponentProps): JSX.Element => { | ||
| const {wrapper, component: instantPayouts} = | ||
| useCreateComponent('instant-payouts'); | ||
| useUpdateWithSetter(instantPayouts, onLoaderStart, (comp, val) => { | ||
| comp.setOnLoaderStart(val); | ||
| }); | ||
| useUpdateWithSetter(instantPayouts, onLoadError, (comp, val) => { | ||
| comp.setOnLoadError(val); | ||
| }); | ||
| return wrapper; | ||
| }; | ||
| export const ConnectNotificationBanner = ({ | ||
@@ -360,3 +224,3 @@ collectionOptions, | ||
| onNotificationsChange?: ({total, actionRequired}: NotificationCount) => void; | ||
| } & CommonComponentProps): JSX.Element | null => { | ||
| } & CommonComponentProps): React.JSX.Element | null => { | ||
| const {wrapper, component: notificationBanner} = useCreateComponent( | ||
@@ -394,3 +258,3 @@ 'notification-banner' | ||
| fetchEphemeralKey?: FetchEphemeralKeyFunction; | ||
| } & CommonComponentProps): JSX.Element => { | ||
| } & CommonComponentProps): React.JSX.Element => { | ||
| const {wrapper, component: issuingCard} = useCreateComponent('issuing-card'); | ||
@@ -430,3 +294,3 @@ | ||
| fetchEphemeralKey?: FetchEphemeralKeyFunction; | ||
| } & CommonComponentProps): JSX.Element => { | ||
| } & CommonComponentProps): React.JSX.Element => { | ||
| const {wrapper, component: issuingCardsList} = | ||
@@ -460,3 +324,3 @@ useCreateComponent('issuing-cards-list'); | ||
| financialAccount: string; | ||
| } & CommonComponentProps): JSX.Element => { | ||
| } & CommonComponentProps): React.JSX.Element => { | ||
| const {wrapper, component: financialAccountComponent} = | ||
@@ -486,3 +350,3 @@ useCreateComponent('financial-account'); | ||
| financialAccount: string; | ||
| } & CommonComponentProps): JSX.Element => { | ||
| } & CommonComponentProps): React.JSX.Element => { | ||
| const {wrapper, component: financialAccountTransactionsComponent} = | ||
@@ -514,19 +378,12 @@ useCreateComponent('financial-account-transactions'); | ||
| export const ConnectRecipients = ({ | ||
| dataSource, | ||
| export const ConnectDocuments = ({ | ||
| onLoadError, | ||
| onLoaderStart, | ||
| }: { | ||
| dataSource: RecipientDataSource; | ||
| } & CommonComponentProps): JSX.Element => { | ||
| const {wrapper, component: recipientsComponent} = | ||
| useCreateComponent('recipients'); | ||
| }: CommonComponentProps): React.JSX.Element => { | ||
| const {wrapper, component: documents} = useCreateComponent('documents'); | ||
| useUpdateWithSetter(recipientsComponent, dataSource, (comp, val) => | ||
| comp.setDataSource(val) | ||
| ); | ||
| useUpdateWithSetter(recipientsComponent, onLoaderStart, (comp, val) => { | ||
| useUpdateWithSetter(documents, onLoaderStart, (comp, val) => { | ||
| comp.setOnLoaderStart(val); | ||
| }); | ||
| useUpdateWithSetter(recipientsComponent, onLoadError, (comp, val) => { | ||
| useUpdateWithSetter(documents, onLoadError, (comp, val) => { | ||
| comp.setOnLoadError(val); | ||
@@ -538,61 +395,27 @@ }); | ||
| export const ConnectCapitalOverview = ({ | ||
| export const ConnectPayoutsList = ({ | ||
| onLoadError, | ||
| onLoaderStart, | ||
| }: CommonComponentProps): JSX.Element => { | ||
| const {wrapper, component: capitalOverview} = | ||
| useCreateComponent('capital-overview'); | ||
| }: CommonComponentProps): React.JSX.Element => { | ||
| const {wrapper, component: payoutsList} = useCreateComponent('payouts-list'); | ||
| useUpdateWithSetter(capitalOverview, onLoaderStart, (comp, val) => { | ||
| useUpdateWithSetter(payoutsList, onLoaderStart, (comp, val) => { | ||
| comp.setOnLoaderStart(val); | ||
| }); | ||
| useUpdateWithSetter(capitalOverview, onLoadError, (comp, val) => { | ||
| useUpdateWithSetter(payoutsList, onLoadError, (comp, val) => { | ||
| comp.setOnLoadError(val); | ||
| }); | ||
| return wrapper; | ||
| }; | ||
| export const ConnectCapitalFinancing = ({ | ||
| defaultFinancingOffer, | ||
| showFinancingSelector, | ||
| howCapitalWorksUrl, | ||
| supportUrl, | ||
| onFinancingsLoaded, | ||
| export const ConnectBalances = ({ | ||
| onLoadError, | ||
| onLoaderStart, | ||
| }: { | ||
| defaultFinancingOffer?: string; | ||
| showFinancingSelector?: boolean; | ||
| howCapitalWorksUrl?: string; | ||
| supportUrl?: string; | ||
| onFinancingsLoaded?: ({total}: {total: number}) => void; | ||
| } & CommonComponentProps): JSX.Element => { | ||
| const {wrapper, component: capitalFinancing} = | ||
| useCreateComponent('capital-financing'); | ||
| }: CommonComponentProps): React.JSX.Element => { | ||
| const {wrapper, component: balances} = useCreateComponent('balances'); | ||
| useUpdateWithSetter(capitalFinancing, defaultFinancingOffer, (comp, val) => | ||
| comp.setDefaultFinancingOffer(val) | ||
| ); | ||
| useUpdateWithSetter(capitalFinancing, showFinancingSelector, (comp, val) => | ||
| comp.setShowFinancingSelector(val) | ||
| ); | ||
| useUpdateWithSetter(capitalFinancing, howCapitalWorksUrl, (comp, val) => | ||
| comp.setHowCapitalWorksUrl(val) | ||
| ); | ||
| useUpdateWithSetter(capitalFinancing, supportUrl, (comp, val) => | ||
| comp.setSupportUrl(val) | ||
| ); | ||
| useUpdateWithSetter(capitalFinancing, onFinancingsLoaded, (comp, val) => | ||
| comp.setOnFinancingsLoaded(val) | ||
| ); | ||
| useUpdateWithSetter(capitalFinancing, onLoaderStart, (comp, val) => { | ||
| useUpdateWithSetter(balances, onLoaderStart, (comp, val) => { | ||
| comp.setOnLoaderStart(val); | ||
| }); | ||
| useUpdateWithSetter(capitalFinancing, onLoadError, (comp, val) => { | ||
| useUpdateWithSetter(balances, onLoadError, (comp, val) => { | ||
| comp.setOnLoadError(val); | ||
@@ -604,173 +427,2 @@ }); | ||
| export const ConnectCapitalFinancingApplication = ({ | ||
| onApplicationSubmitted, | ||
| onApplicationStepChange, | ||
| privacyPolicyUrl, | ||
| howCapitalWorksUrl, | ||
| onLoadError, | ||
| onLoaderStart, | ||
| }: { | ||
| onApplicationSubmitted: () => void; | ||
| onApplicationStepChange?: ({step}: StepChange) => void; | ||
| privacyPolicyUrl?: string; | ||
| howCapitalWorksUrl?: string; | ||
| } & CommonComponentProps): JSX.Element => { | ||
| const {wrapper, component: capitalFinancingApplication} = useCreateComponent( | ||
| 'capital-financing-application' | ||
| ); | ||
| useUpdateWithSetter( | ||
| capitalFinancingApplication, | ||
| onApplicationSubmitted, | ||
| (comp, val) => comp.setOnApplicationSubmitted(val) | ||
| ); | ||
| useUpdateWithSetter( | ||
| capitalFinancingApplication, | ||
| onApplicationStepChange, | ||
| (comp, val) => comp.setOnApplicationStepChange(val) | ||
| ); | ||
| useUpdateWithSetter( | ||
| capitalFinancingApplication, | ||
| privacyPolicyUrl, | ||
| (comp, val) => comp.setPrivacyPolicyUrl(val) | ||
| ); | ||
| useUpdateWithSetter( | ||
| capitalFinancingApplication, | ||
| howCapitalWorksUrl, | ||
| (comp, val) => comp.setHowCapitalWorksUrl(val) | ||
| ); | ||
| useUpdateWithSetter( | ||
| capitalFinancingApplication, | ||
| onLoaderStart, | ||
| (comp, val) => { | ||
| comp.setOnLoaderStart(val); | ||
| } | ||
| ); | ||
| useUpdateWithSetter(capitalFinancingApplication, onLoadError, (comp, val) => { | ||
| comp.setOnLoadError(val); | ||
| }); | ||
| return wrapper; | ||
| }; | ||
| export const ConnectCapitalFinancingPromotion = ({ | ||
| layout, | ||
| onApplicationSubmitted, | ||
| onEligibleFinancingOfferLoaded, | ||
| onApplicationStepChange, | ||
| privacyPolicyUrl, | ||
| howCapitalWorksUrl, | ||
| eligibilityCriteriaUrl, | ||
| onLoadError, | ||
| onLoaderStart, | ||
| }: { | ||
| layout?: FinancingPromotionLayoutType; | ||
| onEligibleFinancingOfferLoaded?: ({ | ||
| productType, | ||
| activeFinancingCount, | ||
| }: FinancingProductType) => void; | ||
| privacyPolicyUrl?: string; | ||
| howCapitalWorksUrl?: string; | ||
| eligibilityCriteriaUrl?: string; | ||
| onApplicationSubmitted?: () => void; | ||
| onApplicationStepChange?: ({step}: StepChange) => void; | ||
| } & CommonComponentProps): JSX.Element => { | ||
| const {wrapper, component: capitalPromotion} = useCreateComponent( | ||
| 'capital-financing-promotion' | ||
| ); | ||
| useUpdateWithSetter(capitalPromotion, layout, (comp, val) => | ||
| comp.setLayout(val) | ||
| ); | ||
| useUpdateWithSetter(capitalPromotion, privacyPolicyUrl, (comp, val) => | ||
| comp.setPrivacyPolicyUrl(val) | ||
| ); | ||
| useUpdateWithSetter(capitalPromotion, howCapitalWorksUrl, (comp, val) => | ||
| comp.setHowCapitalWorksUrl(val) | ||
| ); | ||
| useUpdateWithSetter(capitalPromotion, eligibilityCriteriaUrl, (comp, val) => | ||
| comp.setEligibilityCriteriaUrl(val) | ||
| ); | ||
| useUpdateWithSetter(capitalPromotion, onApplicationSubmitted, (comp, val) => | ||
| comp.setOnApplicationSubmitted(val) | ||
| ); | ||
| useUpdateWithSetter(capitalPromotion, onApplicationStepChange, (comp, val) => | ||
| comp.setOnApplicationStepChange(val) | ||
| ); | ||
| useUpdateWithSetter( | ||
| capitalPromotion, | ||
| onEligibleFinancingOfferLoaded, | ||
| (comp, val) => comp.setOnEligibleFinancingOfferLoaded(val) | ||
| ); | ||
| useUpdateWithSetter(capitalPromotion, onLoaderStart, (comp, val) => { | ||
| comp.setOnLoaderStart(val); | ||
| }); | ||
| useUpdateWithSetter(capitalPromotion, onLoadError, (comp, val) => { | ||
| comp.setOnLoadError(val); | ||
| }); | ||
| return wrapper; | ||
| }; | ||
| export const ConnectDocuments = ({ | ||
| onLoadError, | ||
| onLoaderStart, | ||
| }: CommonComponentProps): JSX.Element => { | ||
| const {wrapper, component: documents} = useCreateComponent('documents'); | ||
| useUpdateWithSetter(documents, onLoaderStart, (comp, val) => { | ||
| comp.setOnLoaderStart(val); | ||
| }); | ||
| useUpdateWithSetter(documents, onLoadError, (comp, val) => { | ||
| comp.setOnLoadError(val); | ||
| }); | ||
| return wrapper; | ||
| }; | ||
| export const ConnectProductTaxCodeSelector = ({ | ||
| onLoadError, | ||
| onLoaderStart, | ||
| onTaxCodeSelect, | ||
| hideDescription, | ||
| disabled, | ||
| initialTaxCode | ||
| }: { | ||
| onTaxCodeSelect?: (taxCode: string) => void; | ||
| hideDescription?: boolean; | ||
| disabled?: boolean; | ||
| initialTaxCode?: string; | ||
| } & CommonComponentProps): JSX.Element => { | ||
| const {wrapper, component: productTaxCodeSelector} = | ||
| useCreateComponent('product-tax-code-selector'); | ||
| useUpdateWithSetter(productTaxCodeSelector, onLoaderStart, (comp, val) => { | ||
| comp.setOnLoaderStart(val); | ||
| }); | ||
| useUpdateWithSetter(productTaxCodeSelector, onLoadError, (comp, val) => { | ||
| comp.setOnLoadError(val); | ||
| }); | ||
| useUpdateWithSetter(productTaxCodeSelector, onTaxCodeSelect, (comp, val) => { | ||
| comp.setOnTaxCodeSelect(val); | ||
| }); | ||
| useUpdateWithSetter(productTaxCodeSelector, hideDescription, (comp, val) => { | ||
| comp.setHideDescription(val); | ||
| }); | ||
| useUpdateWithSetter(productTaxCodeSelector, disabled, (comp, val) => { | ||
| comp.setDisabled(val); | ||
| }); | ||
| useUpdateWithSetter(productTaxCodeSelector, initialTaxCode, (comp, val) => { | ||
| comp.setInitialTaxCode(val); | ||
| }); | ||
| return wrapper; | ||
| }; | ||
| export const ConnectTaxRegistrations = ({ | ||
@@ -781,6 +433,8 @@ onLoadError, | ||
| onAfterTaxRegistrationAdded, | ||
| onAfterTaxRegistrationExpired, | ||
| }: { | ||
| displayCountries?: string[]; | ||
| onAfterTaxRegistrationAdded?: ({id}: {id: string}) => void; | ||
| } & CommonComponentProps): JSX.Element => { | ||
| onAfterTaxRegistrationExpired?: ({id}: {id: string}) => void; | ||
| } & CommonComponentProps): React.JSX.Element => { | ||
| const {wrapper, component: taxRegistrations} = | ||
@@ -809,19 +463,10 @@ useCreateComponent('tax-registrations'); | ||
| return wrapper; | ||
| }; | ||
| useUpdateWithSetter( | ||
| taxRegistrations, | ||
| onAfterTaxRegistrationExpired, | ||
| (comp, val) => { | ||
| comp.setOnAfterTaxRegistrationExpired(val); | ||
| } | ||
| ); | ||
| export const ConnectExportTaxTransactions = ({ | ||
| onLoadError, | ||
| onLoaderStart, | ||
| }: CommonComponentProps): JSX.Element => { | ||
| const {wrapper, component: exportTaxTransactions} = | ||
| useCreateComponent('export-tax-transactions'); | ||
| useUpdateWithSetter(exportTaxTransactions, onLoaderStart, (comp, val) => { | ||
| comp.setOnLoaderStart(val); | ||
| }); | ||
| useUpdateWithSetter(exportTaxTransactions, onLoadError, (comp, val) => { | ||
| comp.setOnLoadError(val); | ||
| }); | ||
| return wrapper; | ||
@@ -840,3 +485,3 @@ }; | ||
| onTaxSettingsUpdated?: ({id}: {id: string}) => void; | ||
| } & CommonComponentProps): JSX.Element => { | ||
| } & CommonComponentProps): React.JSX.Element => { | ||
| const {wrapper, component: taxSettings} = useCreateComponent('tax-settings'); | ||
@@ -866,75 +511,2 @@ | ||
| export const ConnectTaxThresholdMonitoring = ({ | ||
| onLoadError, | ||
| onLoaderStart, | ||
| displayCountries, | ||
| }: { | ||
| displayCountries?: string[]; | ||
| } & CommonComponentProps): JSX.Element => { | ||
| const {wrapper, component: taxSettings} = useCreateComponent( | ||
| 'tax-threshold-monitoring' | ||
| ); | ||
| useUpdateWithSetter(taxSettings, onLoaderStart, (comp, val) => { | ||
| comp.setOnLoaderStart(val); | ||
| }); | ||
| useUpdateWithSetter(taxSettings, onLoadError, (comp, val) => { | ||
| comp.setOnLoadError(val); | ||
| }); | ||
| useUpdateWithSetter(taxSettings, displayCountries, (comp, val) => { | ||
| comp.setDisplayCountries(val); | ||
| }); | ||
| return wrapper; | ||
| }; | ||
| export const ConnectReportingChart = ({ | ||
| reportName, | ||
| intervalStart, | ||
| intervalEnd, | ||
| intervalType, | ||
| onLoadError, | ||
| onLoaderStart, | ||
| }: { | ||
| /** | ||
| * @param reportName The name of the report to render as a chart. | ||
| * @param intervalStart The start date of the report interval. | ||
| * @param intervalEnd The end date of the report interval. | ||
| * @param intervalType The type of the report interval. | ||
| */ | ||
| reportName: ReportName; | ||
| intervalStart?: Date; | ||
| intervalEnd?: Date; | ||
| intervalType?: IntervalType; | ||
| } & CommonComponentProps): JSX.Element | null => { | ||
| const {wrapper, component: reportingChart} = | ||
| useCreateComponent('reporting-chart'); | ||
| useUpdateWithSetter(reportingChart, reportName, (comp, val) => | ||
| comp.setReportName(val) | ||
| ); | ||
| useUpdateWithSetter(reportingChart, intervalStart, (comp, val) => | ||
| comp.setIntervalStart(val) | ||
| ); | ||
| useUpdateWithSetter(reportingChart, intervalEnd, (comp, val) => | ||
| comp.setIntervalEnd(val) | ||
| ); | ||
| useUpdateWithSetter(reportingChart, intervalType, (comp, val) => | ||
| comp.setIntervalType(val) | ||
| ); | ||
| useUpdateWithSetter(reportingChart, onLoaderStart, (comp, val) => { | ||
| comp.setOnLoaderStart(val); | ||
| }); | ||
| useUpdateWithSetter(reportingChart, onLoadError, (comp, val) => { | ||
| comp.setOnLoadError(val); | ||
| }); | ||
| return wrapper; | ||
| }; | ||
| export const ConnectInstantPayoutsPromotion = ({ | ||
@@ -952,3 +524,3 @@ onInstantPayoutsPromotionLoaded, | ||
| onInstantPayoutCreated?: ({payoutId}: {payoutId: string}) => void; | ||
| } & CommonComponentProps): JSX.Element => { | ||
| } & CommonComponentProps): React.JSX.Element => { | ||
| const {wrapper, component: instantPayoutsPromotion} = useCreateComponent( | ||
@@ -993,3 +565,3 @@ 'instant-payouts-promotion' | ||
| onClose: () => void; | ||
| } & CommonComponentProps): JSX.Element | null => { | ||
| } & CommonComponentProps): React.JSX.Element | null => { | ||
| const {wrapper, component: payoutDetails} = | ||
@@ -1012,1 +584,50 @@ useCreateComponent('payout-details'); | ||
| }; | ||
| export const ConnectBalanceReport = ({ | ||
| onLoadError, | ||
| onLoaderStart, | ||
| }: CommonComponentProps): React.JSX.Element => { | ||
| const {wrapper, component: balanceReport} = | ||
| useCreateComponent('balance-report'); | ||
| useUpdateWithSetter(balanceReport, onLoaderStart, (comp, val) => { | ||
| comp.setOnLoaderStart(val); | ||
| }); | ||
| useUpdateWithSetter(balanceReport, onLoadError, (comp, val) => { | ||
| comp.setOnLoadError(val); | ||
| }); | ||
| return wrapper; | ||
| }; | ||
| export const ConnectPayoutReconciliationReport = ({ | ||
| onReportAvailabilityLoaded, | ||
| onLoadError, | ||
| onLoaderStart, | ||
| }: { | ||
| onReportAvailabilityLoaded?: ({ | ||
| isReportAvailable, | ||
| }: { | ||
| isReportAvailable: boolean; | ||
| }) => void; | ||
| } & CommonComponentProps): React.JSX.Element => { | ||
| const {wrapper, component: payoutReconciliationReport} = useCreateComponent( | ||
| 'payout-reconciliation-report' | ||
| ); | ||
| useUpdateWithSetter( | ||
| payoutReconciliationReport, | ||
| onReportAvailabilityLoaded, | ||
| (comp, val) => { | ||
| comp.setOnReportAvailabilityLoaded(val); | ||
| } | ||
| ); | ||
| useUpdateWithSetter(payoutReconciliationReport, onLoaderStart, (comp, val) => { | ||
| comp.setOnLoaderStart(val); | ||
| }); | ||
| useUpdateWithSetter(payoutReconciliationReport, onLoadError, (comp, val) => { | ||
| comp.setOnLoadError(val); | ||
| }); | ||
| return wrapper; | ||
| }; |
@@ -19,3 +19,3 @@ import * as React from 'react'; | ||
| children: any; | ||
| }): JSX.Element => { | ||
| }): React.JSX.Element => { | ||
| return ( | ||
@@ -22,0 +22,0 @@ <ConnectComponentsContext.Provider value={{connectInstance}}> |
+0
-12
@@ -1,6 +0,1 @@ | ||
| export type CollectionOptions = { | ||
| fields: 'currently_due' | 'eventually_due'; | ||
| futureRequirements?: 'omit' | 'include'; | ||
| }; | ||
| export type FetchEphemeralKeyFunction = (fetchParams: { | ||
@@ -14,8 +9,1 @@ issuingCard: string; | ||
| }>; | ||
| export type FinancingProductType = { | ||
| productType: 'standard' | 'refill' | 'none'; | ||
| activeFinancingCount: number; | ||
| }; | ||
| export type FinancingPromotionLayoutType = 'full' | 'banner'; |
@@ -11,3 +11,3 @@ /* eslint-disable react-hooks/exhaustive-deps */ | ||
| tagName: T | ||
| ): {wrapper: JSX.Element; component: ConnectHTMLElementRecord[T] | null} => { | ||
| ): {wrapper: React.JSX.Element; component: ConnectHTMLElementRecord[T] | null} => { | ||
| const [component, setComponent] = React.useState< | ||
@@ -14,0 +14,0 @@ ConnectHTMLElementRecord[T] | null |
| import React from 'react'; | ||
| import type {CollectionOptions} from '../Components'; | ||
| import type { | ||
| CollectionOptions, | ||
| FetchEphemeralKeyFunction, | ||
| FinancingProductType, | ||
| } from '../types'; | ||
| import type { | ||
| LoadError, | ||
| LoaderStart, | ||
| InstallState, | ||
| NotificationCount, | ||
@@ -15,2 +10,3 @@ StepChange, | ||
| } from '@stripe/connect-js'; | ||
| import type {FetchEphemeralKeyFunction} from '../types'; | ||
@@ -23,18 +19,14 @@ export const useUpdateWithSetter = < | ||
| | string[] | ||
| | Record<string, string> | ||
| | PaymentsListDefaultFilters | ||
| | (() => void) | ||
| | FetchEphemeralKeyFunction | ||
| | CollectionOptions | ||
| | PaymentsListDefaultFilters | ||
| | ((notificationCount: NotificationCount) => void) | ||
| | ((loaderStart: LoaderStart) => void) | ||
| | ((loaderError: LoadError) => void) | ||
| | ((installState: InstallState) => void) | ||
| | ((productType: FinancingProductType) => void) | ||
| | ((StepChange: StepChange) => void) | ||
| | Date | ||
| | ((stepChange: StepChange) => void) | ||
| | (({id}: {id: string}) => void) | ||
| | ((taxCode: string) => void) | ||
| | (({promotionShown}: {promotionShown: boolean}) => void) | ||
| | (({payoutId}: {payoutId: string}) => void) | ||
| | (({isReportAvailable}: {isReportAvailable: boolean}) => void) | ||
| | undefined | ||
@@ -41,0 +33,0 @@ >( |
-21
| MIT License | ||
| Copyright (c) 2017 Stripe | ||
| Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| of this software and associated documentation files (the "Software"), to deal | ||
| in the Software without restriction, including without limitation the rights | ||
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| copies of the Software, and to permit persons to whom the Software is | ||
| furnished to do so, subject to the following conditions: | ||
| The above copyright notice and this permission notice shall be included in all | ||
| copies or substantial portions of the Software. | ||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
| SOFTWARE. |
-89
| # @stripe/react-connect-js | ||
| # React Connect.js | ||
| React components for Connect.js and Connect embedded components | ||
| This project is a thin React wrapper around | ||
| [Connect embedded components](https://stripe.com/docs/connect/get-started-connect-embedded-components). | ||
| It allows you to add embedded components to any React app, and manages the state | ||
| and lifecycle of embedded components for you. | ||
| Note: Some Connect embedded components are currently still in preview. These can | ||
| be | ||
| [viewed on our doc site](https://docs.stripe.com/connect/supported-embedded-components), | ||
| where you can also request preview access. | ||
| ### Components | ||
| The list of supported components and their required parameters can be found | ||
| [here](https://stripe.com/docs/connect/supported-embedded-components) | ||
| ### Minimal example | ||
| First, install React Connect.js and | ||
| [Connect.js](https://github.com/stripe/connect-js). | ||
| ```sh | ||
| npm install @stripe/react-connect-js @stripe/connect-js | ||
| ``` | ||
| You have to wrap your components with `ConnectComponentsProvider` in order to | ||
| provide the ConnectInstance context to create or update components | ||
| #### Example | ||
| See more examples in the /examples folder | ||
| ```jsx | ||
| import React from 'react'; | ||
| import ReactDOM from 'react-dom'; | ||
| import {loadConnectAndInitialize} from '@stripe/connect-js'; | ||
| import { | ||
| ConnectPayments, | ||
| ConnectPayouts, | ||
| ConnectPaymentDetails, | ||
| ConnectComponentsProvider, | ||
| } from '@stripe/react-connect-js'; | ||
| const fetchClientSecret = async () => { | ||
| // Fetch the AccountSession client secret by making an API call to your service | ||
| }; | ||
| const connectInstance = loadConnectAndInitialize({ | ||
| publishableKey: '{{pk test123}}', | ||
| fetchClientSecret: fetchClientSecret, | ||
| appearance: { | ||
| variables: { | ||
| colorPrimary: '#228403', //optional appearance param, | ||
| }, | ||
| }, | ||
| }); | ||
| const App = () => ( | ||
| <ConnectComponentsProvider connectInstance={connectInstance}> | ||
| <ConnectPayments /> | ||
| <ConnectPayouts /> | ||
| <ConnectPaymentDetails | ||
| onClose={() => { | ||
| console.log('closed'); | ||
| }} | ||
| payment="pi_test123" | ||
| /> | ||
| </ConnectComponentsProvider> | ||
| ); | ||
| ReactDOM.render(<App />, document.body); | ||
| ``` | ||
| The `stripeConnect.initalize` function returns a `ConnectInstance` once you | ||
| initialize it with a publishable key and a client secret returned from the | ||
| [Account Session API](https://stripe.com/docs/api/account_sessions/create) call. | ||
| We’ve placed a placeholder API key in this example. Replace it with your | ||
| [actual publishable API keys](https://dashboard.stripe.com/account/apikeys) to | ||
| test this code through your Connect account. | ||
| ### Contributing | ||
| If you would like to contribute to React Connect.js, please make sure to read | ||
| our [contributor guidelines](CONTRIBUTING.md). |
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
0
-100%94400
-32.79%14
-12.5%2246
-31.15%1
Infinity%0
-100%