@tesouro/embedded-components-react 0.7.32 → 0.7.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -8
- package/dist/index.d.ts +45 -31
- package/dist/index.js +5 -5
- package/dist/lib/CounterpartsWidget.d.ts +14 -0
- package/dist/lib/CounterpartsWidgetPublic.d.ts +14 -0
- package/dist/lib/CustomersWidget.d.ts +14 -0
- package/dist/lib/{MarketingWidget.d.ts → OfferWidget.d.ts} +31 -31
- package/dist/lib/OfferWidget.js +6 -0
- package/dist/lib/ReceivablesWidget.d.ts +14 -0
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/useCounterpartDetailsActions.js +107 -91
- package/dist/libs/tesouro-embedded-components-react/offer-widget/feature/dist/index.js +5 -0
- package/dist/libs/tesouro-embedded-components-react/{marketing-widget/feature/dist/lib/MarketingWidget/MarketingWidget.js → offer-widget/feature/dist/lib/OfferWidget/OfferWidget.js} +11 -11
- package/dist/libs/tesouro-embedded-components-react/{marketing-widget/feature/dist/lib/MarketingWidget → offer-widget/feature/dist/lib/OfferWidget}/labels.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/{marketing-widget/feature/dist/lib/MarketingWidget/marketingApplicationView.js → offer-widget/feature/dist/lib/OfferWidget/offerApplicationView.js} +2 -2
- package/dist/libs/tesouro-embedded-components-react/offer-widget/feature/dist/lib/analytics/events.js +8 -0
- package/dist/libs/tesouro-embedded-components-react/{marketing-widget → offer-widget}/feature/dist/lib/testIds.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/{marketing-widget → offer-widget}/feature/dist/mocks/labels.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/{marketing-widget/feature/dist/mocks/marketing.js → offer-widget/feature/dist/mocks/offer.js} +3 -3
- package/dist/libs/tesouro-embedded-components-react/offer-widget/feature/dist/scenarios.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/offer-widget/ui/dist/index.js +5 -0
- package/dist/libs/tesouro-embedded-components-react/offer-widget/ui/dist/index2.js +10 -0
- package/dist/libs/tesouro-embedded-components-react/{marketing-widget → offer-widget}/ui/dist/index3.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/{marketing-widget → offer-widget}/ui/dist/index4.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/{marketing-widget → offer-widget}/ui/dist/index5.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/{marketing-widget → offer-widget}/ui/dist/index6.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/{marketing-widget → offer-widget}/ui/dist/index7.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/{marketing-widget → offer-widget}/ui/dist/index8.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/{marketing-widget → offer-widget}/ui/dist/index9.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/labels.js +11 -1
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/subEntityForms.js +36 -38
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useAddressForm.js +43 -41
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useDeleteController.js +40 -34
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/mocks/widgetSuite.js +2 -2
- package/dist/scenarios/index.d.ts +2 -2
- package/dist/scenarios/index.js +3 -3
- package/package.json +1 -1
- package/dist/lib/MarketingWidget.js +0 -6
- package/dist/libs/tesouro-embedded-components-react/marketing-widget/feature/dist/index.js +0 -5
- package/dist/libs/tesouro-embedded-components-react/marketing-widget/feature/dist/lib/analytics/events.js +0 -8
- package/dist/libs/tesouro-embedded-components-react/marketing-widget/feature/dist/scenarios.js +0 -2
- package/dist/libs/tesouro-embedded-components-react/marketing-widget/ui/dist/index.js +0 -5
- package/dist/libs/tesouro-embedded-components-react/marketing-widget/ui/dist/index2.js +0 -10
package/README.md
CHANGED
|
@@ -444,18 +444,20 @@ Walks an applicant through bank-account onboarding: business details, personal d
|
|
|
444
444
|
| `showApplicationStatusRefresh` | `boolean` | `false` | Adds a **Check again** button to the application status card that re-reads the organization's application. Never shown over the form or result screens. |
|
|
445
445
|
| `onResultPhaseChange` | `(isInResultPhase: boolean) => void` | `undefined` | Called with `true` once the widget starts processing a submitted application, and with `false` if it unmounts after that. While `true` it keeps its processing or result screen up whatever the status read says, so leave it mounted. |
|
|
446
446
|
|
|
447
|
-
###
|
|
447
|
+
### OfferWidget
|
|
448
448
|
|
|
449
|
-
|
|
449
|
+
An offer card and modal that invites the user to apply for a product (today, a bank account) and then shows where their application stands.
|
|
450
|
+
|
|
451
|
+
The card and its "Learn more" modal present your product copy (logo, captions, "How it works" steps, benefits). Its Apply now and modal CTAs call `onPrimaryCtaClick`, which you typically wire to open `BankAccountOnboardingWidget`. Once an application exists, the card swaps its CTAs for the application's status (see Behaviour), and it hides itself when the user already has an account.
|
|
450
452
|
|
|
451
453
|
#### Props
|
|
452
454
|
|
|
453
|
-
| Prop | Type
|
|
454
|
-
| ------------------- |
|
|
455
|
-
| `content` | `
|
|
456
|
-
| `onPrimaryCtaClick` | `() => void`
|
|
457
|
-
| `labels` | `PartialDeep<
|
|
458
|
-
| `statusLabels` | `PartialDeep<
|
|
455
|
+
| Prop | Type | Default | Description |
|
|
456
|
+
| ------------------- | -------------------------------------- | -------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
|
|
457
|
+
| `content` | `OfferWidgetContent` | **Required** | Host-resolved card and modal copy, images, "How it works" steps, and benefits. |
|
|
458
|
+
| `onPrimaryCtaClick` | `() => void` | **Required** | Called when the applicant clicks Apply now on the card or the modal CTA (default label: Start application). Closes the modal first. |
|
|
459
|
+
| `labels` | `PartialDeep<OfferWidgetLabels>` | English labels | Override the card and modal copy. See the exported `OfferWidgetLabels` type for every key. |
|
|
460
|
+
| `statusLabels` | `PartialDeep<OfferWidgetStatusLabels>` | English labels | Override the Resume application label and each status message. Heading and body are functions of `{ bankName }`. |
|
|
459
461
|
|
|
460
462
|
### ProductsWidget
|
|
461
463
|
|
package/dist/index.d.ts
CHANGED
|
@@ -4455,6 +4455,20 @@ interface CounterpartMessageLabels {
|
|
|
4455
4455
|
deleteBankAccountTitle: string;
|
|
4456
4456
|
deleteCounterpartMessage: string;
|
|
4457
4457
|
deleteBankAccountMessage: string;
|
|
4458
|
+
/** Success toast after creating a counterpart; `{name}` is replaced with its name. */
|
|
4459
|
+
createSucceeded: string;
|
|
4460
|
+
/** Success toast after editing a counterpart; `{name}` is replaced with its name. */
|
|
4461
|
+
updateSucceeded: string;
|
|
4462
|
+
addressAdded: string;
|
|
4463
|
+
addressUpdated: string;
|
|
4464
|
+
bankAccountAdded: string;
|
|
4465
|
+
bankAccountUpdated: string;
|
|
4466
|
+
counterpartDeleted: string;
|
|
4467
|
+
bankAccountDeleted: string;
|
|
4468
|
+
/** Error toast when a counterpart delete fails without an API message. */
|
|
4469
|
+
deleteCounterpartFailed: string;
|
|
4470
|
+
/** Error toast when a bank account delete fails without an API message. */
|
|
4471
|
+
deleteBankAccountFailed: string;
|
|
4458
4472
|
}
|
|
4459
4473
|
|
|
4460
4474
|
interface NoPolicyBannerLabels {
|
|
@@ -4797,7 +4811,7 @@ type CustomersWidgetProps = WidgetProviderProps & CustomersWidgetOwnProps;
|
|
|
4797
4811
|
*/
|
|
4798
4812
|
declare function CustomersWidget({ pageSizeOptions, onViewAllDocuments, onCreateDocument, screenLabels, formLabels, detailsLabels, addressLabels, deleteLabels, messageLabels, ...widgetProviderProps }: CustomersWidgetProps): React.JSX.Element;
|
|
4799
4813
|
|
|
4800
|
-
interface
|
|
4814
|
+
interface OfferWidgetLabels {
|
|
4801
4815
|
applyNow: string;
|
|
4802
4816
|
learnMore: string;
|
|
4803
4817
|
primaryCta: string;
|
|
@@ -4805,33 +4819,33 @@ interface MarketingWidgetLabels {
|
|
|
4805
4819
|
primaryCtaSubtext: string;
|
|
4806
4820
|
dismissModalAriaLabel: string;
|
|
4807
4821
|
}
|
|
4808
|
-
declare const
|
|
4822
|
+
declare const OFFER_WIDGET_LABELS_EN: OfferWidgetLabels;
|
|
4809
4823
|
|
|
4810
|
-
interface
|
|
4824
|
+
interface OfferWidgetImage {
|
|
4811
4825
|
src: string;
|
|
4812
4826
|
alt: string;
|
|
4813
4827
|
width?: number;
|
|
4814
4828
|
}
|
|
4815
|
-
declare const
|
|
4829
|
+
declare const OfferBenefitIcon: {
|
|
4816
4830
|
readonly Sync: "sync";
|
|
4817
4831
|
readonly Users: "users";
|
|
4818
4832
|
readonly Document: "document";
|
|
4819
4833
|
readonly Dollar: "dollar";
|
|
4820
4834
|
readonly Card: "card";
|
|
4821
4835
|
};
|
|
4822
|
-
type
|
|
4823
|
-
interface
|
|
4836
|
+
type OfferBenefitIcon = (typeof OfferBenefitIcon)[keyof typeof OfferBenefitIcon];
|
|
4837
|
+
interface OfferWidgetBenefit {
|
|
4824
4838
|
text: string;
|
|
4825
|
-
icon:
|
|
4839
|
+
icon: OfferBenefitIcon;
|
|
4826
4840
|
}
|
|
4827
|
-
interface
|
|
4841
|
+
interface OfferWidgetHowItWorksStep {
|
|
4828
4842
|
/** Caller-supplied step badge text, e.g. "1" — the component never derives this from position. */
|
|
4829
4843
|
number: string;
|
|
4830
4844
|
title: string;
|
|
4831
4845
|
description: string;
|
|
4832
4846
|
}
|
|
4833
|
-
interface
|
|
4834
|
-
vspLogo:
|
|
4847
|
+
interface OfferWidgetContent {
|
|
4848
|
+
vspLogo: OfferWidgetImage;
|
|
4835
4849
|
bankingText: string;
|
|
4836
4850
|
primaryCaption: string;
|
|
4837
4851
|
secondaryCaption: string;
|
|
@@ -4842,10 +4856,10 @@ interface MarketingWidgetContent {
|
|
|
4842
4856
|
howItWorksHeader: string;
|
|
4843
4857
|
/** Numbered steps shown in the modal. A VSP may supply any number of steps;
|
|
4844
4858
|
* the section is omitted entirely when the array is empty. */
|
|
4845
|
-
howItWorksSteps:
|
|
4859
|
+
howItWorksSteps: OfferWidgetHowItWorksStep[];
|
|
4846
4860
|
/** Section heading above the benefits grid, e.g. "FROM DAY ONE". */
|
|
4847
4861
|
fromDayOneHeader: string;
|
|
4848
|
-
benefits:
|
|
4862
|
+
benefits: OfferWidgetBenefit[];
|
|
4849
4863
|
}
|
|
4850
4864
|
|
|
4851
4865
|
/**
|
|
@@ -4859,7 +4873,7 @@ interface MarketingWidgetContent {
|
|
|
4859
4873
|
* copy for the applicant's own application says "your email" instead of the
|
|
4860
4874
|
* spec's "[applicant email]".
|
|
4861
4875
|
*/
|
|
4862
|
-
interface
|
|
4876
|
+
interface OfferStatusLabelValues {
|
|
4863
4877
|
bankName: string;
|
|
4864
4878
|
/** The applicant's full name, for either ownership. */
|
|
4865
4879
|
applicantName?: string;
|
|
@@ -4874,13 +4888,13 @@ interface MarketingStatusLabelValues {
|
|
|
4874
4888
|
* Copy for one application state: the status chip, an optional brand-colored
|
|
4875
4889
|
* heading, and the lines under it.
|
|
4876
4890
|
*/
|
|
4877
|
-
interface
|
|
4891
|
+
interface OfferStatusNoticeLabels {
|
|
4878
4892
|
chipLabel: string;
|
|
4879
4893
|
/** Omit for a state whose mock has no heading (the denied states). */
|
|
4880
|
-
heading?: (values:
|
|
4881
|
-
body: (values:
|
|
4894
|
+
heading?: (values: OfferStatusLabelValues) => string;
|
|
4895
|
+
body: (values: OfferStatusLabelValues) => string[];
|
|
4882
4896
|
}
|
|
4883
|
-
interface
|
|
4897
|
+
interface OfferWidgetStatusLabels {
|
|
4884
4898
|
/** Replaces the Apply CTA (card and modal) while the caller's own application is a draft. */
|
|
4885
4899
|
resumeApplication: string;
|
|
4886
4900
|
/** Stands in for the bank's name when widget init does not carry one. */
|
|
@@ -4891,24 +4905,24 @@ interface MarketingWidgetStatusLabels {
|
|
|
4891
4905
|
* hardcoded formatter, so a host can localize it with the copy.
|
|
4892
4906
|
*/
|
|
4893
4907
|
formatDate: (isoDateTime: string) => string;
|
|
4894
|
-
draftStartedByOther:
|
|
4895
|
-
submittedByYou:
|
|
4896
|
-
submittedByOther:
|
|
4897
|
-
deniedByYou:
|
|
4898
|
-
deniedByOther:
|
|
4908
|
+
draftStartedByOther: OfferStatusNoticeLabels;
|
|
4909
|
+
submittedByYou: OfferStatusNoticeLabels;
|
|
4910
|
+
submittedByOther: OfferStatusNoticeLabels;
|
|
4911
|
+
deniedByYou: OfferStatusNoticeLabels;
|
|
4912
|
+
deniedByOther: OfferStatusNoticeLabels;
|
|
4899
4913
|
}
|
|
4900
|
-
declare const
|
|
4914
|
+
declare const OFFER_WIDGET_STATUS_LABELS_EN: OfferWidgetStatusLabels;
|
|
4901
4915
|
|
|
4902
4916
|
type InnerProps = {
|
|
4903
|
-
content:
|
|
4917
|
+
content: OfferWidgetContent;
|
|
4904
4918
|
onPrimaryCtaClick: () => void;
|
|
4905
|
-
labels?: PartialDeep<
|
|
4919
|
+
labels?: PartialDeep<OfferWidgetLabels>;
|
|
4906
4920
|
/** Overrides for the copy shown when the organization already has an application. */
|
|
4907
|
-
statusLabels?: PartialDeep<
|
|
4921
|
+
statusLabels?: PartialDeep<OfferWidgetStatusLabels>;
|
|
4908
4922
|
};
|
|
4909
|
-
type
|
|
4923
|
+
type OfferWidgetProps = WidgetProviderProps & InnerProps;
|
|
4910
4924
|
/**
|
|
4911
|
-
* Self-contained
|
|
4925
|
+
* Self-contained offer card + modal. Hosts supply tenant-specific
|
|
4912
4926
|
* `content` (logos, copy, colors) and wire `onPrimaryCtaClick` to whatever
|
|
4913
4927
|
* should happen next — typically opening bank-account onboarding.
|
|
4914
4928
|
*
|
|
@@ -4924,7 +4938,7 @@ type MarketingWidgetProps = WidgetProviderProps & InnerProps;
|
|
|
4924
4938
|
* normal offer. A `DENIED` message hides itself 30 days after the denial, and
|
|
4925
4939
|
* a status this widget does not know hides the card.
|
|
4926
4940
|
*/
|
|
4927
|
-
declare function
|
|
4941
|
+
declare function OfferWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, disclosuresAcceptance, providerLabels, ...innerProps }: OfferWidgetProps): React.JSX.Element;
|
|
4928
4942
|
|
|
4929
4943
|
interface ProductFormSheetLabels {
|
|
4930
4944
|
createTitle: string;
|
|
@@ -5999,5 +6013,5 @@ interface CheckAmountAndDetailScreenProps {
|
|
|
5999
6013
|
|
|
6000
6014
|
type PendingFeatureStyleSources = CheckAmountAndDetailScreenProps | GapCoverageAlertProps | NoPolicyBannerProps;
|
|
6001
6015
|
|
|
6002
|
-
export { ACCEPT_DISCLOSURES_WIDGET_LABELS_EN, ADDITIONAL_OWNERS_LABELS_EN, APPLICATION_STATUS_LABELS_EN, AcceptDisclosuresWidget, BALANCES_WIDGET_LABELS_EN, BUSINESS_DETAILS_LABELS_EN, BalancesWidget, BankAccountOnboardingWidget, BankAccountsWidget, BillPayWidget, CardDetailsWidget, CounterpartsWidget, CreditCardsWidget, CustomersWidget, DebitCardsWidget, ERROR_STATE_ID, ExpenseManagementWidget, HELP_FAQ_EN, INSIGHTS_FEATURE_LABELS_EN, INSIGHTS_WIDGET_LABELS_EN, Implementation, InsightsWidget, LinkedAccountsWidget,
|
|
6003
|
-
export type { AcceptDisclosuresWidgetLabels, AcceptDisclosuresWidgetProps, AccordionItemCardLabels, Labels$3 as AccountDetailsWidgetLabels, ActivateCardPanelLabels, AdditionalOwner, AdditionalOwnersLabels, AddressFormSheetLabels, ApplicationStatusLabelValues, ApplicationStatusLabels, ApplicationStatusNoticeLabels, BalancesWidgetLabels, BalancesWidgetProps, BankAccountFormSheetLabels, BankAccountOnboardingWidgetLabels, BankAccountOnboardingWidgetProps, FeatureLabels$3 as BankAccountsWidgetFeatureLabels, Labels$4 as BankAccountsWidgetLabels, BankAccountsWidgetProps, BillPayWidgetProps, BusinessDetailsLabels, BusinessDetailsValues, CardDetailsFeatureLabels, CardDetailsPanelLabels as CardDetailsWidgetLabels, CardDetailsWidgetProps, CardsFeatureLabels, CardsListLabels as CardsLabels, CardsPagination, CompanyStructureValue, ConfirmDeleteDialogLabels, CounterpartActionTarget, CounterpartDetailsSheetLabels, CounterpartFormSheetLabels, CounterpartMessageLabels, CounterpartMode, CounterpartsScreenLabels, CounterpartsWidgetProps, CreditCardsWidgetProps, CustomersWidgetOwnProps, CustomersWidgetProps, DebitCardsWidgetProps, DisclosureLinks, EmbeddedClient, Labels$2 as ExpenseManagementWidgetLabels, ExpenseManagementWidgetProps, ExpenseStatusBadgeLabels, FileViewerLabels, HelpFaqAnswer, HelpFaqBullet, HelpFaqBulletType, HelpFaqItem, HelpFaqSection, InsightsFeatureLabels, InsightsWidgetLabels, InsightsWidgetProps, InvoicesFilterBarLabelOverrides, InvoicesFilterBarLabels, InvoicesFilterLabelOverrides, InvoicesFilterLabels, LinkComponent, LinkComponentProps, FeatureLabels$2 as LinkedAccountsWidgetFeatureLabels, Labels$1 as LinkedAccountsWidgetLabels, LinkedAccountsWidgetProps,
|
|
6016
|
+
export { ACCEPT_DISCLOSURES_WIDGET_LABELS_EN, ADDITIONAL_OWNERS_LABELS_EN, APPLICATION_STATUS_LABELS_EN, AcceptDisclosuresWidget, BALANCES_WIDGET_LABELS_EN, BUSINESS_DETAILS_LABELS_EN, BalancesWidget, BankAccountOnboardingWidget, BankAccountsWidget, BillPayWidget, CardDetailsWidget, CounterpartsWidget, CreditCardsWidget, CustomersWidget, DebitCardsWidget, ERROR_STATE_ID, ExpenseManagementWidget, HELP_FAQ_EN, INSIGHTS_FEATURE_LABELS_EN, INSIGHTS_WIDGET_LABELS_EN, Implementation, InsightsWidget, LinkedAccountsWidget, OFFER_WIDGET_LABELS_EN, OFFER_WIDGET_STATUS_LABELS_EN, OfferBenefitIcon, OfferWidget, PERSONAL_DETAILS_LABELS_EN, ProductsWidget, RESULT_LABELS_EN, ReceivablesWidget, RefreshingRootWidgetProvider, RootWidgetProvider, SINGLE_INSIGHT_LABELS_EN, Scope, SettingsSection, SettingsWidget, DEFAULT_FEATURE_LABELS as TRANSFERS_FEATURE_LABELS_EN, TRANSFERS_WIDGET_LABELS_EN, TransfersWidget, UIFramework, WIDGET_SUITE_DEFAULT_SECTIONS, WIDGET_SUITE_LABELS_EN, WidgetProvider, WidgetSuite, WidgetSuiteSectionId, WidgetTokenRefreshProvider, cloneEmbeddedClient, getGlobalWidgetConfig, getGlobalWidgetInitState, isScope, registerDesignSystemEnsurer, registerUIRenderers, setGlobalWidgetConfig, subscribeToGlobalWidgetInitState, updateGlobalWidgetConfig, useDisclosuresAcceptanceSurface, useOwnWidgetConfig, useRefetchWidget, useWidgetConfig, useWidgetError, useWidgetInitStaleForToken, useWidgetLoading, useWidgetToken };
|
|
6017
|
+
export type { AcceptDisclosuresWidgetLabels, AcceptDisclosuresWidgetProps, AccordionItemCardLabels, Labels$3 as AccountDetailsWidgetLabels, ActivateCardPanelLabels, AdditionalOwner, AdditionalOwnersLabels, AddressFormSheetLabels, ApplicationStatusLabelValues, ApplicationStatusLabels, ApplicationStatusNoticeLabels, BalancesWidgetLabels, BalancesWidgetProps, BankAccountFormSheetLabels, BankAccountOnboardingWidgetLabels, BankAccountOnboardingWidgetProps, FeatureLabels$3 as BankAccountsWidgetFeatureLabels, Labels$4 as BankAccountsWidgetLabels, BankAccountsWidgetProps, BillPayWidgetProps, BusinessDetailsLabels, BusinessDetailsValues, CardDetailsFeatureLabels, CardDetailsPanelLabels as CardDetailsWidgetLabels, CardDetailsWidgetProps, CardsFeatureLabels, CardsListLabels as CardsLabels, CardsPagination, CompanyStructureValue, ConfirmDeleteDialogLabels, CounterpartActionTarget, CounterpartDetailsSheetLabels, CounterpartFormSheetLabels, CounterpartMessageLabels, CounterpartMode, CounterpartsScreenLabels, CounterpartsWidgetProps, CreditCardsWidgetProps, CustomersWidgetOwnProps, CustomersWidgetProps, DebitCardsWidgetProps, DisclosureLinks, EmbeddedClient, Labels$2 as ExpenseManagementWidgetLabels, ExpenseManagementWidgetProps, ExpenseStatusBadgeLabels, FileViewerLabels, HelpFaqAnswer, HelpFaqBullet, HelpFaqBulletType, HelpFaqItem, HelpFaqSection, InsightsFeatureLabels, InsightsWidgetLabels, InsightsWidgetProps, InvoicesFilterBarLabelOverrides, InvoicesFilterBarLabels, InvoicesFilterLabelOverrides, InvoicesFilterLabels, LinkComponent, LinkComponentProps, FeatureLabels$2 as LinkedAccountsWidgetFeatureLabels, Labels$1 as LinkedAccountsWidgetLabels, LinkedAccountsWidgetProps, MeasureUnitDeleteDialogLabels, MeasureUnitsManagerLabels, OfferStatusLabelValues, OfferStatusNoticeLabels, OfferWidgetBenefit, OfferWidgetContent, OfferWidgetHowItWorksStep, OfferWidgetImage, OfferWidgetLabels, OfferWidgetProps, OfferWidgetStatusLabels, PendingFeatureStyleSources, PersonalDetailsLabels, PersonalDetailsValues, ProductDeleteDialogLabels, ProductDetailsSheetLabels, ProductFormSheetLabels, ProductMessageLabels, ProductsScreenLabels, ProductsWidgetProps, ReceivableActionDialogLabels, ReceivableActionsModalLabels, ReceivableAuditHistoryLabels, ReceivableBankAttribution, ReceivableDetailsPanelLabelOverrides, ReceivableDetailsPanelLabels, ReceivableDocumentType, ReceivableFormDialogLabels, ReceivableFormSheetLabels, ReceivableMessageLabels, ReceivablePaymentDialogLabels, ReceivablePreviewLabels, ReceivableStatusBadgeLabels, ReceivablesScreenLabelOverrides, ReceivablesScreenLabels, ReceivablesWidgetProps, RefreshingRootWidgetProviderProps, ResultLabels, RootWidgetProviderProps, SettingsWidgetAdditionalSection, FeatureLabels$1 as SettingsWidgetFeatureLabels, Labels as SettingsWidgetLabels, SettingsWidgetProps, SettingsWidgetSection, SettingsWidgetSectionId, SingleInsightLabels, TransactionDetailsActionsLabels, TransactionDetailsLabels, FeatureLabels as TransfersWidgetFeatureLabels, TransfersWidgetLabels, TransfersWidgetProps, WidgetConfig, WidgetConfigInput, WidgetInitResponse, WidgetInitState, WidgetProviderLabels, WidgetProviderProps, WidgetSuiteCardsLabels, WidgetSuiteDashboardLabels, WidgetSuiteDisclosureLabels, WidgetSuiteExpensesLabels, WidgetSuiteLabelOverrides, WidgetSuiteLabels, WidgetSuiteMenuLabels, WidgetSuiteOnboardingGateLabels, WidgetSuiteOnboardingLabels, WidgetSuiteProps, WidgetSuiteSectionContentLabels, WidgetSuiteSectionTitleLabels, WidgetTokenFetcher, WidgetTokenManager, WidgetTokenRefreshProviderProps, WidgetTokenState };
|
package/dist/index.js
CHANGED
|
@@ -44,10 +44,10 @@ import { BankAccountOnboardingWidget as ee } from "./libs/tesouro-embedded-compo
|
|
|
44
44
|
import { WidgetSuite as te } from "./libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/WidgetSuite.js";
|
|
45
45
|
import { CounterpartsWidget as ne } from "./lib/CounterpartsWidgetPublic.js";
|
|
46
46
|
import { CustomersWidget as re } from "./libs/tesouro-embedded-components-react/customers-widget/feature/dist/lib/CustomersWidget/CustomersWidget.js";
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
47
|
+
import { OFFER_WIDGET_STATUS_LABELS_EN as ie } from "./libs/tesouro-embedded-components-react/offer-widget/feature/dist/lib/OfferWidget/labels.js";
|
|
48
|
+
import { OFFER_WIDGET_LABELS_EN as ae } from "./libs/tesouro-embedded-components-react/offer-widget/ui/dist/index2.js";
|
|
49
|
+
import { OfferBenefitIcon as oe } from "./libs/tesouro-embedded-components-react/offer-widget/ui/dist/index3.js";
|
|
50
|
+
import { OfferWidget as se } from "./libs/tesouro-embedded-components-react/offer-widget/feature/dist/lib/OfferWidget/OfferWidget.js";
|
|
51
51
|
import { ProductsWidget as ce } from "./libs/tesouro-embedded-components-react/products-widget/feature/dist/lib/ProductsWidget/ProductsWidget.js";
|
|
52
52
|
import { WidgetProvider as le } from "./lib/WidgetProviderPublic.js";
|
|
53
|
-
export { q as ACCEPT_DISCLOSURES_WIDGET_LABELS_EN, Y as ADDITIONAL_OWNERS_LABELS_EN, $ as APPLICATION_STATUS_LABELS_EN, J as AcceptDisclosuresWidget, M as BALANCES_WIDGET_LABELS_EN, X as BUSINESS_DETAILS_LABELS_EN, N as BalancesWidget, ee as BankAccountOnboardingWidget, D as BankAccountsWidget, O as BillPayWidget, k as CardDetailsWidget, ne as CounterpartsWidget, A as CreditCardsWidget, re as CustomersWidget, j as DebitCardsWidget, l as ERROR_STATE_ID, R as ExpenseManagementWidget, V as HELP_FAQ_EN, P as INSIGHTS_FEATURE_LABELS_EN, F as INSIGHTS_WIDGET_LABELS_EN, u as Implementation, L as InsightsWidget, U as LinkedAccountsWidget, ae as
|
|
53
|
+
export { q as ACCEPT_DISCLOSURES_WIDGET_LABELS_EN, Y as ADDITIONAL_OWNERS_LABELS_EN, $ as APPLICATION_STATUS_LABELS_EN, J as AcceptDisclosuresWidget, M as BALANCES_WIDGET_LABELS_EN, X as BUSINESS_DETAILS_LABELS_EN, N as BalancesWidget, ee as BankAccountOnboardingWidget, D as BankAccountsWidget, O as BillPayWidget, k as CardDetailsWidget, ne as CounterpartsWidget, A as CreditCardsWidget, re as CustomersWidget, j as DebitCardsWidget, l as ERROR_STATE_ID, R as ExpenseManagementWidget, V as HELP_FAQ_EN, P as INSIGHTS_FEATURE_LABELS_EN, F as INSIGHTS_WIDGET_LABELS_EN, u as Implementation, L as InsightsWidget, U as LinkedAccountsWidget, ae as OFFER_WIDGET_LABELS_EN, ie as OFFER_WIDGET_STATUS_LABELS_EN, oe as OfferBenefitIcon, se as OfferWidget, Z as PERSONAL_DETAILS_LABELS_EN, ce as ProductsWidget, Q as RESULT_LABELS_EN, z as ReceivablesWidget, y as RefreshingRootWidgetProvider, g as RootWidgetProvider, I as SINGLE_INSIGHT_LABELS_EN, i as Scope, B as SettingsSection, H as SettingsWidget, W as TRANSFERS_FEATURE_LABELS_EN, G as TRANSFERS_WIDGET_LABELS_EN, K as TransfersWidget, o as UIFramework, t as WIDGET_SUITE_DEFAULT_SECTIONS, e as WIDGET_SUITE_LABELS_EN, le as WidgetProvider, te as WidgetSuite, n as WidgetSuiteSectionId, _ as WidgetTokenRefreshProvider, r as cloneEmbeddedClient, d as getGlobalWidgetConfig, m as getGlobalWidgetInitState, a as isScope, s as registerDesignSystemEnsurer, c as registerUIRenderers, f as setGlobalWidgetConfig, h as subscribeToGlobalWidgetInitState, p as updateGlobalWidgetConfig, b as useDisclosuresAcceptanceSurface, x as useOwnWidgetConfig, S as useRefetchWidget, C as useWidgetConfig, w as useWidgetError, T as useWidgetInitStaleForToken, E as useWidgetLoading, v as useWidgetToken };
|
|
@@ -798,6 +798,20 @@ interface CounterpartMessageLabels {
|
|
|
798
798
|
deleteBankAccountTitle: string;
|
|
799
799
|
deleteCounterpartMessage: string;
|
|
800
800
|
deleteBankAccountMessage: string;
|
|
801
|
+
/** Success toast after creating a counterpart; `{name}` is replaced with its name. */
|
|
802
|
+
createSucceeded: string;
|
|
803
|
+
/** Success toast after editing a counterpart; `{name}` is replaced with its name. */
|
|
804
|
+
updateSucceeded: string;
|
|
805
|
+
addressAdded: string;
|
|
806
|
+
addressUpdated: string;
|
|
807
|
+
bankAccountAdded: string;
|
|
808
|
+
bankAccountUpdated: string;
|
|
809
|
+
counterpartDeleted: string;
|
|
810
|
+
bankAccountDeleted: string;
|
|
811
|
+
/** Error toast when a counterpart delete fails without an API message. */
|
|
812
|
+
deleteCounterpartFailed: string;
|
|
813
|
+
/** Error toast when a bank account delete fails without an API message. */
|
|
814
|
+
deleteBankAccountFailed: string;
|
|
801
815
|
}
|
|
802
816
|
|
|
803
817
|
/**
|
|
@@ -798,6 +798,20 @@ interface CounterpartMessageLabels {
|
|
|
798
798
|
deleteBankAccountTitle: string;
|
|
799
799
|
deleteCounterpartMessage: string;
|
|
800
800
|
deleteBankAccountMessage: string;
|
|
801
|
+
/** Success toast after creating a counterpart; `{name}` is replaced with its name. */
|
|
802
|
+
createSucceeded: string;
|
|
803
|
+
/** Success toast after editing a counterpart; `{name}` is replaced with its name. */
|
|
804
|
+
updateSucceeded: string;
|
|
805
|
+
addressAdded: string;
|
|
806
|
+
addressUpdated: string;
|
|
807
|
+
bankAccountAdded: string;
|
|
808
|
+
bankAccountUpdated: string;
|
|
809
|
+
counterpartDeleted: string;
|
|
810
|
+
bankAccountDeleted: string;
|
|
811
|
+
/** Error toast when a counterpart delete fails without an API message. */
|
|
812
|
+
deleteCounterpartFailed: string;
|
|
813
|
+
/** Error toast when a bank account delete fails without an API message. */
|
|
814
|
+
deleteBankAccountFailed: string;
|
|
801
815
|
}
|
|
802
816
|
|
|
803
817
|
/**
|
|
@@ -788,6 +788,20 @@ interface CounterpartMessageLabels {
|
|
|
788
788
|
deleteBankAccountTitle: string;
|
|
789
789
|
deleteCounterpartMessage: string;
|
|
790
790
|
deleteBankAccountMessage: string;
|
|
791
|
+
/** Success toast after creating a counterpart; `{name}` is replaced with its name. */
|
|
792
|
+
createSucceeded: string;
|
|
793
|
+
/** Success toast after editing a counterpart; `{name}` is replaced with its name. */
|
|
794
|
+
updateSucceeded: string;
|
|
795
|
+
addressAdded: string;
|
|
796
|
+
addressUpdated: string;
|
|
797
|
+
bankAccountAdded: string;
|
|
798
|
+
bankAccountUpdated: string;
|
|
799
|
+
counterpartDeleted: string;
|
|
800
|
+
bankAccountDeleted: string;
|
|
801
|
+
/** Error toast when a counterpart delete fails without an API message. */
|
|
802
|
+
deleteCounterpartFailed: string;
|
|
803
|
+
/** Error toast when a bank account delete fails without an API message. */
|
|
804
|
+
deleteBankAccountFailed: string;
|
|
791
805
|
}
|
|
792
806
|
|
|
793
807
|
/**
|
|
@@ -3,7 +3,7 @@ import { ComponentType, AnchorHTMLAttributes, ReactNode, ErrorInfo } from 'react
|
|
|
3
3
|
import { PartialDeep } from 'type-fest';
|
|
4
4
|
import { FallbackProps } from 'react-error-boundary';
|
|
5
5
|
|
|
6
|
-
interface
|
|
6
|
+
interface OfferWidgetLabels {
|
|
7
7
|
applyNow: string;
|
|
8
8
|
learnMore: string;
|
|
9
9
|
primaryCta: string;
|
|
@@ -11,33 +11,33 @@ interface MarketingWidgetLabels {
|
|
|
11
11
|
primaryCtaSubtext: string;
|
|
12
12
|
dismissModalAriaLabel: string;
|
|
13
13
|
}
|
|
14
|
-
declare const
|
|
14
|
+
declare const OFFER_WIDGET_LABELS_EN: OfferWidgetLabels;
|
|
15
15
|
|
|
16
|
-
interface
|
|
16
|
+
interface OfferWidgetImage {
|
|
17
17
|
src: string;
|
|
18
18
|
alt: string;
|
|
19
19
|
width?: number;
|
|
20
20
|
}
|
|
21
|
-
declare const
|
|
21
|
+
declare const OfferBenefitIcon: {
|
|
22
22
|
readonly Sync: "sync";
|
|
23
23
|
readonly Users: "users";
|
|
24
24
|
readonly Document: "document";
|
|
25
25
|
readonly Dollar: "dollar";
|
|
26
26
|
readonly Card: "card";
|
|
27
27
|
};
|
|
28
|
-
type
|
|
29
|
-
interface
|
|
28
|
+
type OfferBenefitIcon = (typeof OfferBenefitIcon)[keyof typeof OfferBenefitIcon];
|
|
29
|
+
interface OfferWidgetBenefit {
|
|
30
30
|
text: string;
|
|
31
|
-
icon:
|
|
31
|
+
icon: OfferBenefitIcon;
|
|
32
32
|
}
|
|
33
|
-
interface
|
|
33
|
+
interface OfferWidgetHowItWorksStep {
|
|
34
34
|
/** Caller-supplied step badge text, e.g. "1" — the component never derives this from position. */
|
|
35
35
|
number: string;
|
|
36
36
|
title: string;
|
|
37
37
|
description: string;
|
|
38
38
|
}
|
|
39
|
-
interface
|
|
40
|
-
vspLogo:
|
|
39
|
+
interface OfferWidgetContent {
|
|
40
|
+
vspLogo: OfferWidgetImage;
|
|
41
41
|
bankingText: string;
|
|
42
42
|
primaryCaption: string;
|
|
43
43
|
secondaryCaption: string;
|
|
@@ -48,10 +48,10 @@ interface MarketingWidgetContent {
|
|
|
48
48
|
howItWorksHeader: string;
|
|
49
49
|
/** Numbered steps shown in the modal. A VSP may supply any number of steps;
|
|
50
50
|
* the section is omitted entirely when the array is empty. */
|
|
51
|
-
howItWorksSteps:
|
|
51
|
+
howItWorksSteps: OfferWidgetHowItWorksStep[];
|
|
52
52
|
/** Section heading above the benefits grid, e.g. "FROM DAY ONE". */
|
|
53
53
|
fromDayOneHeader: string;
|
|
54
|
-
benefits:
|
|
54
|
+
benefits: OfferWidgetBenefit[];
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
type AuthToken = string | undefined;
|
|
@@ -690,7 +690,7 @@ interface WidgetProviderProps extends WidgetProviderBaseProps {
|
|
|
690
690
|
* copy for the applicant's own application says "your email" instead of the
|
|
691
691
|
* spec's "[applicant email]".
|
|
692
692
|
*/
|
|
693
|
-
interface
|
|
693
|
+
interface OfferStatusLabelValues {
|
|
694
694
|
bankName: string;
|
|
695
695
|
/** The applicant's full name, for either ownership. */
|
|
696
696
|
applicantName?: string;
|
|
@@ -705,13 +705,13 @@ interface MarketingStatusLabelValues {
|
|
|
705
705
|
* Copy for one application state: the status chip, an optional brand-colored
|
|
706
706
|
* heading, and the lines under it.
|
|
707
707
|
*/
|
|
708
|
-
interface
|
|
708
|
+
interface OfferStatusNoticeLabels {
|
|
709
709
|
chipLabel: string;
|
|
710
710
|
/** Omit for a state whose mock has no heading (the denied states). */
|
|
711
|
-
heading?: (values:
|
|
712
|
-
body: (values:
|
|
711
|
+
heading?: (values: OfferStatusLabelValues) => string;
|
|
712
|
+
body: (values: OfferStatusLabelValues) => string[];
|
|
713
713
|
}
|
|
714
|
-
interface
|
|
714
|
+
interface OfferWidgetStatusLabels {
|
|
715
715
|
/** Replaces the Apply CTA (card and modal) while the caller's own application is a draft. */
|
|
716
716
|
resumeApplication: string;
|
|
717
717
|
/** Stands in for the bank's name when widget init does not carry one. */
|
|
@@ -722,24 +722,24 @@ interface MarketingWidgetStatusLabels {
|
|
|
722
722
|
* hardcoded formatter, so a host can localize it with the copy.
|
|
723
723
|
*/
|
|
724
724
|
formatDate: (isoDateTime: string) => string;
|
|
725
|
-
draftStartedByOther:
|
|
726
|
-
submittedByYou:
|
|
727
|
-
submittedByOther:
|
|
728
|
-
deniedByYou:
|
|
729
|
-
deniedByOther:
|
|
725
|
+
draftStartedByOther: OfferStatusNoticeLabels;
|
|
726
|
+
submittedByYou: OfferStatusNoticeLabels;
|
|
727
|
+
submittedByOther: OfferStatusNoticeLabels;
|
|
728
|
+
deniedByYou: OfferStatusNoticeLabels;
|
|
729
|
+
deniedByOther: OfferStatusNoticeLabels;
|
|
730
730
|
}
|
|
731
|
-
declare const
|
|
731
|
+
declare const OFFER_WIDGET_STATUS_LABELS_EN: OfferWidgetStatusLabels;
|
|
732
732
|
|
|
733
733
|
type InnerProps = {
|
|
734
|
-
content:
|
|
734
|
+
content: OfferWidgetContent;
|
|
735
735
|
onPrimaryCtaClick: () => void;
|
|
736
|
-
labels?: PartialDeep<
|
|
736
|
+
labels?: PartialDeep<OfferWidgetLabels>;
|
|
737
737
|
/** Overrides for the copy shown when the organization already has an application. */
|
|
738
|
-
statusLabels?: PartialDeep<
|
|
738
|
+
statusLabels?: PartialDeep<OfferWidgetStatusLabels>;
|
|
739
739
|
};
|
|
740
|
-
type
|
|
740
|
+
type OfferWidgetProps = WidgetProviderProps & InnerProps;
|
|
741
741
|
/**
|
|
742
|
-
* Self-contained
|
|
742
|
+
* Self-contained offer card + modal. Hosts supply tenant-specific
|
|
743
743
|
* `content` (logos, copy, colors) and wire `onPrimaryCtaClick` to whatever
|
|
744
744
|
* should happen next — typically opening bank-account onboarding.
|
|
745
745
|
*
|
|
@@ -755,7 +755,7 @@ type MarketingWidgetProps = WidgetProviderProps & InnerProps;
|
|
|
755
755
|
* normal offer. A `DENIED` message hides itself 30 days after the denial, and
|
|
756
756
|
* a status this widget does not know hides the card.
|
|
757
757
|
*/
|
|
758
|
-
declare function
|
|
758
|
+
declare function OfferWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, disclosuresAcceptance, providerLabels, ...innerProps }: OfferWidgetProps): React.JSX.Element;
|
|
759
759
|
|
|
760
|
-
export {
|
|
761
|
-
export type {
|
|
760
|
+
export { OFFER_WIDGET_LABELS_EN, OFFER_WIDGET_STATUS_LABELS_EN, OfferBenefitIcon, OfferWidget };
|
|
761
|
+
export type { OfferStatusLabelValues, OfferStatusNoticeLabels, OfferWidgetBenefit, OfferWidgetContent, OfferWidgetHowItWorksStep, OfferWidgetImage, OfferWidgetLabels, OfferWidgetProps, OfferWidgetStatusLabels };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { OFFER_WIDGET_STATUS_LABELS_EN as e } from "../libs/tesouro-embedded-components-react/offer-widget/feature/dist/lib/OfferWidget/labels.js";
|
|
2
|
+
import { OFFER_WIDGET_LABELS_EN as t } from "../libs/tesouro-embedded-components-react/offer-widget/ui/dist/index2.js";
|
|
3
|
+
import { OfferBenefitIcon as n } from "../libs/tesouro-embedded-components-react/offer-widget/ui/dist/index3.js";
|
|
4
|
+
import { OfferWidget as r } from "../libs/tesouro-embedded-components-react/offer-widget/feature/dist/lib/OfferWidget/OfferWidget.js";
|
|
5
|
+
import "../libs/tesouro-embedded-components-react/offer-widget/feature/dist/index.js";
|
|
6
|
+
export { t as OFFER_WIDGET_LABELS_EN, e as OFFER_WIDGET_STATUS_LABELS_EN, n as OfferBenefitIcon, r as OfferWidget };
|
|
@@ -863,6 +863,20 @@ interface CounterpartMessageLabels {
|
|
|
863
863
|
deleteBankAccountTitle: string;
|
|
864
864
|
deleteCounterpartMessage: string;
|
|
865
865
|
deleteBankAccountMessage: string;
|
|
866
|
+
/** Success toast after creating a counterpart; `{name}` is replaced with its name. */
|
|
867
|
+
createSucceeded: string;
|
|
868
|
+
/** Success toast after editing a counterpart; `{name}` is replaced with its name. */
|
|
869
|
+
updateSucceeded: string;
|
|
870
|
+
addressAdded: string;
|
|
871
|
+
addressUpdated: string;
|
|
872
|
+
bankAccountAdded: string;
|
|
873
|
+
bankAccountUpdated: string;
|
|
874
|
+
counterpartDeleted: string;
|
|
875
|
+
bankAccountDeleted: string;
|
|
876
|
+
/** Error toast when a counterpart delete fails without an API message. */
|
|
877
|
+
deleteCounterpartFailed: string;
|
|
878
|
+
/** Error toast when a bank account delete fails without an API message. */
|
|
879
|
+
deleteBankAccountFailed: string;
|
|
866
880
|
}
|
|
867
881
|
|
|
868
882
|
interface ProductFormSheetLabels {
|