@tesouro/embedded-components-react 0.5.202 → 0.5.204
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 +20 -6
- package/dist/index.css +12 -0
- package/dist/index.d.ts +70 -7
- package/dist/index.js +7 -6
- package/dist/lib/MarketingWidget.d.ts +66 -7
- package/dist/lib/MarketingWidget.js +5 -4
- package/dist/lib/ProductsWidget.d.ts +4 -0
- package/dist/lib/ProductsWidget.js +1 -1
- package/dist/lib/ReceivablesWidget.d.ts +2 -0
- package/dist/libs/tesouro-embedded-components-react/marketing-widget/feature/dist/index.js +5 -4
- package/dist/libs/tesouro-embedded-components-react/marketing-widget/feature/dist/index3.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/marketing-widget/feature/dist/index4.js +33 -81
- package/dist/libs/tesouro-embedded-components-react/marketing-widget/feature/dist/index5.js +34 -0
- package/dist/libs/tesouro-embedded-components-react/marketing-widget/feature/dist/index6.js +20 -0
- package/dist/libs/tesouro-embedded-components-react/marketing-widget/feature/dist/index7.js +161 -0
- package/dist/libs/tesouro-embedded-components-react/marketing-widget/ui/dist/index.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/marketing-widget/ui/dist/index3.js +5 -1
- package/dist/libs/tesouro-embedded-components-react/marketing-widget/ui/dist/index8.js +34 -81
- package/dist/libs/tesouro-embedded-components-react/marketing-widget/ui/dist/index9.js +92 -0
- package/dist/libs/tesouro-embedded-components-react/products-widget/feature/dist/index.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/products-widget/feature/dist/index10.js +136 -0
- package/dist/libs/tesouro-embedded-components-react/products-widget/feature/dist/index4.js +5 -30
- package/dist/libs/tesouro-embedded-components-react/products-widget/feature/dist/index5.js +9 -19
- package/dist/libs/tesouro-embedded-components-react/products-widget/feature/dist/index6.js +22 -54
- package/dist/libs/tesouro-embedded-components-react/products-widget/feature/dist/index7.js +14 -40
- package/dist/libs/tesouro-embedded-components-react/products-widget/feature/dist/index8.js +57 -118
- package/dist/libs/tesouro-embedded-components-react/products-widget/feature/dist/index9.js +72 -0
- package/dist/libs/tesouro-embedded-components-react/products-widget/ui/dist/index2.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/products-widget/ui/dist/index4.js +97 -93
- package/dist/libs/tesouro-embedded-components-react/products-widget/ui/dist/index5.js +35 -32
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +2 -1
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/useOrganizationApplicationStatus.js +25 -0
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/useOrganizationOnboardingSuppression.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index10.js +8 -8
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index4.js +8 -8
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index9.js +8 -8
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/feature/dist/lib/MeasureUnitsManagerContainer.js +79 -70
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/feature/dist/lib/useMeasureUnits.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/ui/dist/index2.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/ui/dist/index4.js +109 -107
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -513,15 +513,29 @@ A self-contained widget that walks an applicant through the embedded bank-accoun
|
|
|
513
513
|
|
|
514
514
|
A self-contained marketing card and modal that presents host-supplied banking product copy (logo, captions, "How it works" steps, benefits, colors). The card renders two CTAs — Apply now and Learn more — and the modal's own CTA. The host wires all three to whatever should happen next — typically opening `BankAccountOnboardingWidget`.
|
|
515
515
|
|
|
516
|
-
The widget renders nothing until widget init
|
|
516
|
+
The widget renders nothing until widget init and the organization's `application-status` read resolve. It hides itself when the caller is already onboarded (`ACTIVE` / `INACTIVE`), invited (`INVITED`), or their organization's bank-account application is `COMPLETE`.
|
|
517
|
+
|
|
518
|
+
Otherwise the card follows the organization's bank-account application:
|
|
519
|
+
|
|
520
|
+
| Application status | Started by the caller | Started by a colleague |
|
|
521
|
+
| ---------------------- | ------------------------------------------ | ------------------------------ |
|
|
522
|
+
| none | Normal offer | Normal offer |
|
|
523
|
+
| `DRAFT` | Normal offer, CTA reads Resume application | Status chip + message, no CTAs |
|
|
524
|
+
| `SUBMITTED` | Status chip + message, no CTAs | Status chip + message, no CTAs |
|
|
525
|
+
| `DENIED` | Status chip + message, no CTAs | Status chip + message, no CTAs |
|
|
526
|
+
| `DELETED` / `CANCELED` | Normal offer | Normal offer |
|
|
527
|
+
| `COMPLETE` | Hidden | Hidden |
|
|
528
|
+
|
|
529
|
+
Resume application calls the same `onPrimaryCtaClick`: `BankAccountOnboardingWidget` resumes the caller's own draft by itself. The bank's name in the messages comes from widget init (`bankName`). Tenant-specific assets and copy are always passed in as `content` — the published package does not look up white-label or bank maps.
|
|
517
530
|
|
|
518
531
|
#### Props
|
|
519
532
|
|
|
520
|
-
| Prop | Type
|
|
521
|
-
| ------------------- |
|
|
522
|
-
| `content` | `MarketingWidgetContent`
|
|
523
|
-
| `onPrimaryCtaClick` | `() => void`
|
|
524
|
-
| `labels` | `PartialDeep<MarketingWidgetLabels>`
|
|
533
|
+
| Prop | Type | Required | Description |
|
|
534
|
+
| ------------------- | ------------------------------------------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
535
|
+
| `content` | `MarketingWidgetContent` | Yes | Host-resolved card and modal copy, images, "How it works" steps, benefits, and appearance. |
|
|
536
|
+
| `onPrimaryCtaClick` | `() => void` | Yes | Called when the applicant clicks Apply now on the card or the modal CTA (default label: Start application). Closes the modal first. |
|
|
537
|
+
| `labels` | `PartialDeep<MarketingWidgetLabels>` | No | Override Apply now, Learn more, the modal CTA + subtext, and the modal dismiss `aria-label`. |
|
|
538
|
+
| `statusLabels` | `PartialDeep<MarketingWidgetStatusLabels>` | No | Override the Resume application label and the chip, heading and body copy of each application-status message. Heading and body are functions of `{ bankName }`. |
|
|
525
539
|
|
|
526
540
|
### ProductsWidget
|
|
527
541
|
|
package/dist/index.css
CHANGED
|
@@ -1245,6 +1245,9 @@
|
|
|
1245
1245
|
.ttw\:w-\[15\%\] {
|
|
1246
1246
|
width: 15%;
|
|
1247
1247
|
}
|
|
1248
|
+
.ttw\:w-\[20\%\] {
|
|
1249
|
+
width: 20%;
|
|
1250
|
+
}
|
|
1248
1251
|
.ttw\:w-\[20rem\] {
|
|
1249
1252
|
width: 20rem;
|
|
1250
1253
|
}
|
|
@@ -1254,6 +1257,9 @@
|
|
|
1254
1257
|
.ttw\:w-\[27\.5rem\] {
|
|
1255
1258
|
width: 27.5rem;
|
|
1256
1259
|
}
|
|
1260
|
+
.ttw\:w-\[30\%\] {
|
|
1261
|
+
width: 30%;
|
|
1262
|
+
}
|
|
1257
1263
|
.ttw\:w-\[32rem\] {
|
|
1258
1264
|
width: 32rem;
|
|
1259
1265
|
}
|
|
@@ -1263,6 +1269,9 @@
|
|
|
1263
1269
|
.ttw\:w-\[42px\] {
|
|
1264
1270
|
width: 42px;
|
|
1265
1271
|
}
|
|
1272
|
+
.ttw\:w-\[50\%\] {
|
|
1273
|
+
width: 50%;
|
|
1274
|
+
}
|
|
1266
1275
|
.ttw\:w-\[55\%\] {
|
|
1267
1276
|
width: 55%;
|
|
1268
1277
|
}
|
|
@@ -2591,6 +2600,9 @@
|
|
|
2591
2600
|
.ttw\:bg-card {
|
|
2592
2601
|
background-color: var(--ttw-card);
|
|
2593
2602
|
}
|
|
2603
|
+
.ttw\:bg-current {
|
|
2604
|
+
background-color: currentcolor;
|
|
2605
|
+
}
|
|
2594
2606
|
.ttw\:bg-cyan-50 {
|
|
2595
2607
|
background-color: var(--ttw-color-cyan-50);
|
|
2596
2608
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -4784,6 +4784,8 @@ interface MeasureUnitsManagerLabels {
|
|
|
4784
4784
|
saveAction: string;
|
|
4785
4785
|
cancelAction: string;
|
|
4786
4786
|
emptyText: string;
|
|
4787
|
+
/** Accessible label for the per-row actions-menu trigger button. */
|
|
4788
|
+
moreActionsLabel: string;
|
|
4787
4789
|
}
|
|
4788
4790
|
interface MeasureUnitDeleteDialogLabels {
|
|
4789
4791
|
/** `{name}` is replaced with the unit name. */
|
|
@@ -5163,10 +5165,63 @@ interface MarketingWidgetContent {
|
|
|
5163
5165
|
appearance: MarketingWidgetAppearance;
|
|
5164
5166
|
}
|
|
5165
5167
|
|
|
5168
|
+
/**
|
|
5169
|
+
* Values a status label can interpolate. The bank name comes from widget init
|
|
5170
|
+
* and already has its fallback applied, so a label never sees null. The rest
|
|
5171
|
+
* come from the `application-status` read, already formatted, and are absent
|
|
5172
|
+
* when it does not carry them (the dates are null for applications that
|
|
5173
|
+
* predate the backend recording them), so every label has copy for both.
|
|
5174
|
+
*
|
|
5175
|
+
* There is no applicant email: the read does not return one, so the denied
|
|
5176
|
+
* copy for the applicant's own application says "your email" instead of the
|
|
5177
|
+
* spec's "[applicant email]".
|
|
5178
|
+
*/
|
|
5179
|
+
interface MarketingStatusLabelValues {
|
|
5180
|
+
bankName: string;
|
|
5181
|
+
/** The applicant's full name, for either ownership. */
|
|
5182
|
+
applicantName?: string;
|
|
5183
|
+
/** When the application was started, formatted by `formatDate`. */
|
|
5184
|
+
startedOn?: string;
|
|
5185
|
+
/** When the application was submitted, formatted by `formatDate`. */
|
|
5186
|
+
submittedOn?: string;
|
|
5187
|
+
/** When the application was denied, formatted by `formatDate`. */
|
|
5188
|
+
deniedOn?: string;
|
|
5189
|
+
}
|
|
5190
|
+
/**
|
|
5191
|
+
* Copy for one application state: the status chip, an optional brand-colored
|
|
5192
|
+
* heading, and the lines under it.
|
|
5193
|
+
*/
|
|
5194
|
+
interface MarketingStatusNoticeLabels {
|
|
5195
|
+
chipLabel: string;
|
|
5196
|
+
/** Omit for a state whose mock has no heading (the denied states). */
|
|
5197
|
+
heading?: (values: MarketingStatusLabelValues) => string;
|
|
5198
|
+
body: (values: MarketingStatusLabelValues) => string[];
|
|
5199
|
+
}
|
|
5200
|
+
interface MarketingWidgetStatusLabels {
|
|
5201
|
+
/** Replaces the Apply CTA (card and modal) while the caller's own application is a draft. */
|
|
5202
|
+
resumeApplication: string;
|
|
5203
|
+
/** Stands in for the bank's name when widget init does not carry one. */
|
|
5204
|
+
bankNameFallback: string;
|
|
5205
|
+
/**
|
|
5206
|
+
* Formats an application date (an ISO date-time from the status read) for
|
|
5207
|
+
* the `startedOn` / `submittedOn` / `deniedOn` values. A label, not a
|
|
5208
|
+
* hardcoded formatter, so a host can localize it with the copy.
|
|
5209
|
+
*/
|
|
5210
|
+
formatDate: (isoDateTime: string) => string;
|
|
5211
|
+
draftStartedByOther: MarketingStatusNoticeLabels;
|
|
5212
|
+
submittedByYou: MarketingStatusNoticeLabels;
|
|
5213
|
+
submittedByOther: MarketingStatusNoticeLabels;
|
|
5214
|
+
deniedByYou: MarketingStatusNoticeLabels;
|
|
5215
|
+
deniedByOther: MarketingStatusNoticeLabels;
|
|
5216
|
+
}
|
|
5217
|
+
declare const MARKETING_WIDGET_STATUS_LABELS_EN: MarketingWidgetStatusLabels;
|
|
5218
|
+
|
|
5166
5219
|
type InnerProps = {
|
|
5167
5220
|
content: MarketingWidgetContent;
|
|
5168
5221
|
onPrimaryCtaClick: () => void;
|
|
5169
5222
|
labels?: PartialDeep<MarketingWidgetLabels>;
|
|
5223
|
+
/** Overrides for the copy shown when the organization already has an application. */
|
|
5224
|
+
statusLabels?: PartialDeep<MarketingWidgetStatusLabels>;
|
|
5170
5225
|
};
|
|
5171
5226
|
type MarketingWidgetProps = WidgetProviderProps & InnerProps;
|
|
5172
5227
|
/**
|
|
@@ -5174,11 +5229,17 @@ type MarketingWidgetProps = WidgetProviderProps & InnerProps;
|
|
|
5174
5229
|
* `content` (logos, copy, colors) and wire `onPrimaryCtaClick` to whatever
|
|
5175
5230
|
* should happen next — typically opening bank-account onboarding.
|
|
5176
5231
|
*
|
|
5177
|
-
* Renders nothing until widget init
|
|
5178
|
-
*
|
|
5179
|
-
*
|
|
5180
|
-
*
|
|
5181
|
-
*
|
|
5232
|
+
* Renders nothing until widget init and the organization's application
|
|
5233
|
+
* status resolve, and hides itself when the caller is already onboarded
|
|
5234
|
+
* (`ACTIVE` / `INACTIVE`), invited (`INVITED`), or their organization's
|
|
5235
|
+
* bank-account application is `COMPLETE`.
|
|
5236
|
+
*
|
|
5237
|
+
* Otherwise it follows that application's status (EMBD-6173): the caller's own
|
|
5238
|
+
* `DRAFT` renames Apply to "Resume application"; a colleague's `DRAFT`, any
|
|
5239
|
+
* `SUBMITTED` and any `DENIED` application replace the captions and CTAs
|
|
5240
|
+
* with a status chip and message; no application, or a `DELETED` / `CANCELED` one, shows the
|
|
5241
|
+
* normal offer. A `DENIED` message hides itself 30 days after the denial, and
|
|
5242
|
+
* a status this widget does not know hides the card.
|
|
5182
5243
|
*/
|
|
5183
5244
|
declare function MarketingWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, disclosuresAcceptance, providerLabels, ...innerProps }: MarketingWidgetProps): React.JSX.Element;
|
|
5184
5245
|
|
|
@@ -5212,6 +5273,8 @@ interface ProductsScreenLabels {
|
|
|
5212
5273
|
errorTitle: string;
|
|
5213
5274
|
errorDescription: string;
|
|
5214
5275
|
errorRetry: string;
|
|
5276
|
+
accessRestrictedTitle: string;
|
|
5277
|
+
accessRestrictedDescription: string;
|
|
5215
5278
|
/**
|
|
5216
5279
|
* A focused row's accessible name. The row itself is the control that
|
|
5217
5280
|
* opens it, so the name says what Enter does. A template so locales own the
|
|
@@ -5398,5 +5461,5 @@ interface CheckAmountAndDetailScreenProps {
|
|
|
5398
5461
|
|
|
5399
5462
|
type PendingFeatureStyleSources = CheckAmountAndDetailScreenProps | GapCoverageAlertProps | NoPolicyBannerProps;
|
|
5400
5463
|
|
|
5401
|
-
export { ACCEPT_DISCLOSURES_WIDGET_LABELS_EN, ADDITIONAL_OWNERS_LABELS_EN, AcceptDisclosuresWidget, BALANCES_WIDGET_LABELS_EN, BUSINESS_DETAILS_LABELS_EN, BalancesWidget, BankAccountOnboardingWidget, BankAccountsWidget, BillPayWidget, CardDetailsWidget, CounterpartsWidget, CreditCardsWidget, CustomersWidget, DebitCardsWidget, ERROR_STATE_ID, ExpenseManagementWidget, HELP_FAQ_EN, INSIGHTS_FEATURE_LABELS_EN, INSIGHTS_WIDGET_LABELS_EN, Implementation, InsightsWidget, ReceivablesWidgetMonite as InvoicingWidget, LinkedAccountsWidget, MARKETING_WIDGET_LABELS_EN, MarketingBenefitIcon, MarketingWidget, 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, UploadReceiptWidget, 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 };
|
|
5402
|
-
export type { AcceptDisclosuresWidgetLabels, AcceptDisclosuresWidgetProps, AccordionItemCardLabels, Labels$3 as AccountDetailsWidgetLabels, ActivateCardPanelLabels, AdditionalOwner, AdditionalOwnersLabels, AddressFormSheetLabels, BalancesWidgetLabels, BalancesWidgetProps, BankAccountFormSheetLabels, BankAccountOnboardingWidgetLabels, BankAccountOnboardingWidgetProps, FeatureLabels$3 as BankAccountsWidgetFeatureLabels, Labels$4 as BankAccountsWidgetLabels, BankAccountsWidgetProps, BillPayWidgetProps, BusinessDetailsLabels, BusinessDetailsValues, CardDetailsFeatureLabels, CardDetailsPanelLabels as CardDetailsWidgetLabels, CardDetailsWidgetProps, CardsFeatureLabels, CardsListLabels as CardsLabels, CardsPagination, CompanyStructureValue, ConfirmDeleteDialogLabels, CounterpartActionTarget, CounterpartDetailsSheetLabels, CounterpartFormSheetLabels, CounterpartMessageLabels, CounterpartMode, CounterpartsScreenLabels, CounterpartsWidgetProps, CreditCardsWidgetProps, CustomersWidgetOwnProps, CustomersWidgetProps, DebitCardsWidgetProps, DisclosureLinks, EmbeddedClient, Labels$2 as ExpenseManagementWidgetLabels, ExpenseManagementWidgetProps, FileViewerLabels, HelpFaqAnswer, HelpFaqBullet, HelpFaqBulletType, HelpFaqItem, HelpFaqSection, InsightsFeatureLabels, InsightsWidgetLabels, InsightsWidgetProps, ReceivablesWidgetMoniteProps as InvoicingWidgetProps, LinkComponent, LinkComponentProps, FeatureLabels$2 as LinkedAccountsWidgetFeatureLabels, Labels$1 as LinkedAccountsWidgetLabels, LinkedAccountsWidgetProps, MarketingWidgetAppearance, MarketingWidgetBenefit, MarketingWidgetContent, MarketingWidgetHowItWorksStep, MarketingWidgetImage, MarketingWidgetLabels, MarketingWidgetProps, MeasureUnitDeleteDialogLabels, MeasureUnitsManagerLabels, PendingFeatureStyleSources, PersonalDetailsLabels, PersonalDetailsValues, ProductDeleteDialogLabels, ProductDetailsSheetLabels, ProductFormSheetLabels, ProductMessageLabels, ProductsScreenLabels, ProductsWidgetProps, ReceiptMatchSummary, ReceivableActionDialogLabels, ReceivableDetailsSheetLabelOverrides, ReceivableDetailsSheetLabels, ReceivableDocumentType, ReceivableFormSheetLabels, ReceivableMessageLabels, ReceivablePaymentDialogLabels, ReceivableSendDialogLabels, ReceivableStatusBadgeLabels, ReceivablesScreenLabelOverrides, ReceivablesScreenLabels, ReceivablesWidgetProps, ReceivablesWidgetTab, RefreshingRootWidgetProviderProps, ResultLabels, RootWidgetProviderProps, SettingsWidgetAdditionalSection, FeatureLabels$1 as SettingsWidgetFeatureLabels, Labels as SettingsWidgetLabels, SettingsWidgetProps, SettingsWidgetSection, SettingsWidgetSectionId, SingleInsightLabels, TransactionDetailsActionsLabels, TransactionDetailsLabels, FeatureLabels as TransfersWidgetFeatureLabels, TransfersWidgetLabels, TransfersWidgetProps, UploadReceiptWidgetProps, WidgetConfig, WidgetConfigInput, WidgetInitResponse, WidgetInitState, WidgetProviderLabels, WidgetProviderProps, WidgetSuiteCardsLabels, WidgetSuiteDashboardLabels, WidgetSuiteDisclosureLabels, WidgetSuiteExpensesLabels, WidgetSuiteLabelOverrides, WidgetSuiteLabels, WidgetSuiteMenuLabels, WidgetSuiteOnboardingGateLabels, WidgetSuiteOnboardingLabels, WidgetSuiteProps, WidgetSuiteSectionContentLabels, WidgetSuiteSectionTitleLabels, WidgetTokenFetcher, WidgetTokenManager, WidgetTokenRefreshProviderProps, WidgetTokenState };
|
|
5464
|
+
export { ACCEPT_DISCLOSURES_WIDGET_LABELS_EN, ADDITIONAL_OWNERS_LABELS_EN, AcceptDisclosuresWidget, BALANCES_WIDGET_LABELS_EN, BUSINESS_DETAILS_LABELS_EN, BalancesWidget, BankAccountOnboardingWidget, BankAccountsWidget, BillPayWidget, CardDetailsWidget, CounterpartsWidget, CreditCardsWidget, CustomersWidget, DebitCardsWidget, ERROR_STATE_ID, ExpenseManagementWidget, HELP_FAQ_EN, INSIGHTS_FEATURE_LABELS_EN, INSIGHTS_WIDGET_LABELS_EN, Implementation, InsightsWidget, ReceivablesWidgetMonite as InvoicingWidget, LinkedAccountsWidget, MARKETING_WIDGET_LABELS_EN, MARKETING_WIDGET_STATUS_LABELS_EN, MarketingBenefitIcon, MarketingWidget, 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, UploadReceiptWidget, 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 };
|
|
5465
|
+
export type { AcceptDisclosuresWidgetLabels, AcceptDisclosuresWidgetProps, AccordionItemCardLabels, Labels$3 as AccountDetailsWidgetLabels, ActivateCardPanelLabels, AdditionalOwner, AdditionalOwnersLabels, AddressFormSheetLabels, BalancesWidgetLabels, BalancesWidgetProps, BankAccountFormSheetLabels, BankAccountOnboardingWidgetLabels, BankAccountOnboardingWidgetProps, FeatureLabels$3 as BankAccountsWidgetFeatureLabels, Labels$4 as BankAccountsWidgetLabels, BankAccountsWidgetProps, BillPayWidgetProps, BusinessDetailsLabels, BusinessDetailsValues, CardDetailsFeatureLabels, CardDetailsPanelLabels as CardDetailsWidgetLabels, CardDetailsWidgetProps, CardsFeatureLabels, CardsListLabels as CardsLabels, CardsPagination, CompanyStructureValue, ConfirmDeleteDialogLabels, CounterpartActionTarget, CounterpartDetailsSheetLabels, CounterpartFormSheetLabels, CounterpartMessageLabels, CounterpartMode, CounterpartsScreenLabels, CounterpartsWidgetProps, CreditCardsWidgetProps, CustomersWidgetOwnProps, CustomersWidgetProps, DebitCardsWidgetProps, DisclosureLinks, EmbeddedClient, Labels$2 as ExpenseManagementWidgetLabels, ExpenseManagementWidgetProps, FileViewerLabels, HelpFaqAnswer, HelpFaqBullet, HelpFaqBulletType, HelpFaqItem, HelpFaqSection, InsightsFeatureLabels, InsightsWidgetLabels, InsightsWidgetProps, ReceivablesWidgetMoniteProps as InvoicingWidgetProps, LinkComponent, LinkComponentProps, FeatureLabels$2 as LinkedAccountsWidgetFeatureLabels, Labels$1 as LinkedAccountsWidgetLabels, LinkedAccountsWidgetProps, MarketingStatusLabelValues, MarketingStatusNoticeLabels, MarketingWidgetAppearance, MarketingWidgetBenefit, MarketingWidgetContent, MarketingWidgetHowItWorksStep, MarketingWidgetImage, MarketingWidgetLabels, MarketingWidgetProps, MarketingWidgetStatusLabels, MeasureUnitDeleteDialogLabels, MeasureUnitsManagerLabels, PendingFeatureStyleSources, PersonalDetailsLabels, PersonalDetailsValues, ProductDeleteDialogLabels, ProductDetailsSheetLabels, ProductFormSheetLabels, ProductMessageLabels, ProductsScreenLabels, ProductsWidgetProps, ReceiptMatchSummary, ReceivableActionDialogLabels, ReceivableDetailsSheetLabelOverrides, ReceivableDetailsSheetLabels, ReceivableDocumentType, ReceivableFormSheetLabels, ReceivableMessageLabels, ReceivablePaymentDialogLabels, ReceivableSendDialogLabels, ReceivableStatusBadgeLabels, ReceivablesScreenLabelOverrides, ReceivablesScreenLabels, ReceivablesWidgetProps, ReceivablesWidgetTab, RefreshingRootWidgetProviderProps, ResultLabels, RootWidgetProviderProps, SettingsWidgetAdditionalSection, FeatureLabels$1 as SettingsWidgetFeatureLabels, Labels as SettingsWidgetLabels, SettingsWidgetProps, SettingsWidgetSection, SettingsWidgetSectionId, SingleInsightLabels, TransactionDetailsActionsLabels, TransactionDetailsLabels, FeatureLabels as TransfersWidgetFeatureLabels, TransfersWidgetLabels, TransfersWidgetProps, UploadReceiptWidgetProps, 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
|
@@ -61,16 +61,17 @@ import "./lib/InsightsWidget.js";
|
|
|
61
61
|
import "./lib/InvoicingWidget.js";
|
|
62
62
|
import "./lib/LinkedAccountsWidget.js";
|
|
63
63
|
import "./lib/BankAccountOnboardingWidget.js";
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
66
|
-
import {
|
|
64
|
+
import { MARKETING_WIDGET_STATUS_LABELS_EN as ae } from "./libs/tesouro-embedded-components-react/marketing-widget/feature/dist/index4.js";
|
|
65
|
+
import { MARKETING_WIDGET_LABELS_EN as oe } from "./libs/tesouro-embedded-components-react/marketing-widget/ui/dist/index2.js";
|
|
66
|
+
import { MarketingBenefitIcon as se } from "./libs/tesouro-embedded-components-react/marketing-widget/ui/dist/index3.js";
|
|
67
|
+
import { MarketingWidget as ce } from "./libs/tesouro-embedded-components-react/marketing-widget/feature/dist/index7.js";
|
|
67
68
|
import "./lib/MarketingWidget.js";
|
|
68
|
-
import { ProductsWidget as
|
|
69
|
+
import { ProductsWidget as le } from "./libs/tesouro-embedded-components-react/products-widget/feature/dist/index10.js";
|
|
69
70
|
import "./lib/ProductsWidget.js";
|
|
70
71
|
import "./lib/ReceivablesWidget.js";
|
|
71
72
|
import "./lib/SettingsWidget.js";
|
|
72
73
|
import "./lib/TransfersWidget.js";
|
|
73
|
-
import { WidgetProvider as
|
|
74
|
+
import { WidgetProvider as ue } from "./lib/WidgetProviderPublic.js";
|
|
74
75
|
import "./lib/WidgetProvider.js";
|
|
75
76
|
import "./packages/tesouro-embedded-components-react/src/scopes.js";
|
|
76
|
-
export { Y as ACCEPT_DISCLOSURES_WIDGET_LABELS_EN, Z as ADDITIONAL_OWNERS_LABELS_EN, X as AcceptDisclosuresWidget, M as BALANCES_WIDGET_LABELS_EN, Q as BUSINESS_DETAILS_LABELS_EN, N as BalancesWidget, te as BankAccountOnboardingWidget, D as BankAccountsWidget, O as BillPayWidget, k as CardDetailsWidget, re as CounterpartsWidget, A as CreditCardsWidget, ie as CustomersWidget, j as DebitCardsWidget, l as ERROR_STATE_ID, z as ExpenseManagementWidget, U as HELP_FAQ_EN, P as INSIGHTS_FEATURE_LABELS_EN, F as INSIGHTS_WIDGET_LABELS_EN, u as Implementation, L as InsightsWidget, B as InvoicingWidget, G as LinkedAccountsWidget,
|
|
77
|
+
export { Y as ACCEPT_DISCLOSURES_WIDGET_LABELS_EN, Z as ADDITIONAL_OWNERS_LABELS_EN, X as AcceptDisclosuresWidget, M as BALANCES_WIDGET_LABELS_EN, Q as BUSINESS_DETAILS_LABELS_EN, N as BalancesWidget, te as BankAccountOnboardingWidget, D as BankAccountsWidget, O as BillPayWidget, k as CardDetailsWidget, re as CounterpartsWidget, A as CreditCardsWidget, ie as CustomersWidget, j as DebitCardsWidget, l as ERROR_STATE_ID, z as ExpenseManagementWidget, U as HELP_FAQ_EN, P as INSIGHTS_FEATURE_LABELS_EN, F as INSIGHTS_WIDGET_LABELS_EN, u as Implementation, L as InsightsWidget, B as InvoicingWidget, G as LinkedAccountsWidget, oe as MARKETING_WIDGET_LABELS_EN, ae as MARKETING_WIDGET_STATUS_LABELS_EN, se as MarketingBenefitIcon, ce as MarketingWidget, $ as PERSONAL_DETAILS_LABELS_EN, le as ProductsWidget, ee as RESULT_LABELS_EN, V as ReceivablesWidget, y as RefreshingRootWidgetProvider, g as RootWidgetProvider, I as SINGLE_INSIGHT_LABELS_EN, i as Scope, H as SettingsSection, W as SettingsWidget, K as TRANSFERS_FEATURE_LABELS_EN, q as TRANSFERS_WIDGET_LABELS_EN, J as TransfersWidget, o as UIFramework, R as UploadReceiptWidget, t as WIDGET_SUITE_DEFAULT_SECTIONS, e as WIDGET_SUITE_LABELS_EN, ue as WidgetProvider, ne 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 };
|
|
@@ -688,10 +688,63 @@ interface WidgetProviderProps extends WidgetProviderBaseProps {
|
|
|
688
688
|
providerLabels?: Partial<WidgetProviderLabels>;
|
|
689
689
|
}
|
|
690
690
|
|
|
691
|
+
/**
|
|
692
|
+
* Values a status label can interpolate. The bank name comes from widget init
|
|
693
|
+
* and already has its fallback applied, so a label never sees null. The rest
|
|
694
|
+
* come from the `application-status` read, already formatted, and are absent
|
|
695
|
+
* when it does not carry them (the dates are null for applications that
|
|
696
|
+
* predate the backend recording them), so every label has copy for both.
|
|
697
|
+
*
|
|
698
|
+
* There is no applicant email: the read does not return one, so the denied
|
|
699
|
+
* copy for the applicant's own application says "your email" instead of the
|
|
700
|
+
* spec's "[applicant email]".
|
|
701
|
+
*/
|
|
702
|
+
interface MarketingStatusLabelValues {
|
|
703
|
+
bankName: string;
|
|
704
|
+
/** The applicant's full name, for either ownership. */
|
|
705
|
+
applicantName?: string;
|
|
706
|
+
/** When the application was started, formatted by `formatDate`. */
|
|
707
|
+
startedOn?: string;
|
|
708
|
+
/** When the application was submitted, formatted by `formatDate`. */
|
|
709
|
+
submittedOn?: string;
|
|
710
|
+
/** When the application was denied, formatted by `formatDate`. */
|
|
711
|
+
deniedOn?: string;
|
|
712
|
+
}
|
|
713
|
+
/**
|
|
714
|
+
* Copy for one application state: the status chip, an optional brand-colored
|
|
715
|
+
* heading, and the lines under it.
|
|
716
|
+
*/
|
|
717
|
+
interface MarketingStatusNoticeLabels {
|
|
718
|
+
chipLabel: string;
|
|
719
|
+
/** Omit for a state whose mock has no heading (the denied states). */
|
|
720
|
+
heading?: (values: MarketingStatusLabelValues) => string;
|
|
721
|
+
body: (values: MarketingStatusLabelValues) => string[];
|
|
722
|
+
}
|
|
723
|
+
interface MarketingWidgetStatusLabels {
|
|
724
|
+
/** Replaces the Apply CTA (card and modal) while the caller's own application is a draft. */
|
|
725
|
+
resumeApplication: string;
|
|
726
|
+
/** Stands in for the bank's name when widget init does not carry one. */
|
|
727
|
+
bankNameFallback: string;
|
|
728
|
+
/**
|
|
729
|
+
* Formats an application date (an ISO date-time from the status read) for
|
|
730
|
+
* the `startedOn` / `submittedOn` / `deniedOn` values. A label, not a
|
|
731
|
+
* hardcoded formatter, so a host can localize it with the copy.
|
|
732
|
+
*/
|
|
733
|
+
formatDate: (isoDateTime: string) => string;
|
|
734
|
+
draftStartedByOther: MarketingStatusNoticeLabels;
|
|
735
|
+
submittedByYou: MarketingStatusNoticeLabels;
|
|
736
|
+
submittedByOther: MarketingStatusNoticeLabels;
|
|
737
|
+
deniedByYou: MarketingStatusNoticeLabels;
|
|
738
|
+
deniedByOther: MarketingStatusNoticeLabels;
|
|
739
|
+
}
|
|
740
|
+
declare const MARKETING_WIDGET_STATUS_LABELS_EN: MarketingWidgetStatusLabels;
|
|
741
|
+
|
|
691
742
|
type InnerProps = {
|
|
692
743
|
content: MarketingWidgetContent;
|
|
693
744
|
onPrimaryCtaClick: () => void;
|
|
694
745
|
labels?: PartialDeep<MarketingWidgetLabels>;
|
|
746
|
+
/** Overrides for the copy shown when the organization already has an application. */
|
|
747
|
+
statusLabels?: PartialDeep<MarketingWidgetStatusLabels>;
|
|
695
748
|
};
|
|
696
749
|
type MarketingWidgetProps = WidgetProviderProps & InnerProps;
|
|
697
750
|
/**
|
|
@@ -699,13 +752,19 @@ type MarketingWidgetProps = WidgetProviderProps & InnerProps;
|
|
|
699
752
|
* `content` (logos, copy, colors) and wire `onPrimaryCtaClick` to whatever
|
|
700
753
|
* should happen next — typically opening bank-account onboarding.
|
|
701
754
|
*
|
|
702
|
-
* Renders nothing until widget init
|
|
703
|
-
*
|
|
704
|
-
*
|
|
705
|
-
*
|
|
706
|
-
*
|
|
755
|
+
* Renders nothing until widget init and the organization's application
|
|
756
|
+
* status resolve, and hides itself when the caller is already onboarded
|
|
757
|
+
* (`ACTIVE` / `INACTIVE`), invited (`INVITED`), or their organization's
|
|
758
|
+
* bank-account application is `COMPLETE`.
|
|
759
|
+
*
|
|
760
|
+
* Otherwise it follows that application's status (EMBD-6173): the caller's own
|
|
761
|
+
* `DRAFT` renames Apply to "Resume application"; a colleague's `DRAFT`, any
|
|
762
|
+
* `SUBMITTED` and any `DENIED` application replace the captions and CTAs
|
|
763
|
+
* with a status chip and message; no application, or a `DELETED` / `CANCELED` one, shows the
|
|
764
|
+
* normal offer. A `DENIED` message hides itself 30 days after the denial, and
|
|
765
|
+
* a status this widget does not know hides the card.
|
|
707
766
|
*/
|
|
708
767
|
declare function MarketingWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, disclosuresAcceptance, providerLabels, ...innerProps }: MarketingWidgetProps): React.JSX.Element;
|
|
709
768
|
|
|
710
|
-
export { MARKETING_WIDGET_LABELS_EN, MarketingBenefitIcon, MarketingWidget };
|
|
711
|
-
export type { MarketingWidgetAppearance, MarketingWidgetBenefit, MarketingWidgetContent, MarketingWidgetHowItWorksStep, MarketingWidgetImage, MarketingWidgetLabels, MarketingWidgetProps };
|
|
769
|
+
export { MARKETING_WIDGET_LABELS_EN, MARKETING_WIDGET_STATUS_LABELS_EN, MarketingBenefitIcon, MarketingWidget };
|
|
770
|
+
export type { MarketingStatusLabelValues, MarketingStatusNoticeLabels, MarketingWidgetAppearance, MarketingWidgetBenefit, MarketingWidgetContent, MarketingWidgetHowItWorksStep, MarketingWidgetImage, MarketingWidgetLabels, MarketingWidgetProps, MarketingWidgetStatusLabels };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { MARKETING_WIDGET_STATUS_LABELS_EN as e } from "../libs/tesouro-embedded-components-react/marketing-widget/feature/dist/index4.js";
|
|
2
|
+
import { MARKETING_WIDGET_LABELS_EN as t } from "../libs/tesouro-embedded-components-react/marketing-widget/ui/dist/index2.js";
|
|
3
|
+
import { MarketingBenefitIcon as n } from "../libs/tesouro-embedded-components-react/marketing-widget/ui/dist/index3.js";
|
|
4
|
+
import { MarketingWidget as r } from "../libs/tesouro-embedded-components-react/marketing-widget/feature/dist/index7.js";
|
|
4
5
|
import "../libs/tesouro-embedded-components-react/marketing-widget/feature/dist/index.js";
|
|
5
|
-
export {
|
|
6
|
+
export { t as MARKETING_WIDGET_LABELS_EN, e as MARKETING_WIDGET_STATUS_LABELS_EN, n as MarketingBenefitIcon, r as MarketingWidget };
|
|
@@ -676,6 +676,8 @@ interface MeasureUnitsManagerLabels {
|
|
|
676
676
|
saveAction: string;
|
|
677
677
|
cancelAction: string;
|
|
678
678
|
emptyText: string;
|
|
679
|
+
/** Accessible label for the per-row actions-menu trigger button. */
|
|
680
|
+
moreActionsLabel: string;
|
|
679
681
|
}
|
|
680
682
|
interface MeasureUnitDeleteDialogLabels {
|
|
681
683
|
/** `{name}` is replaced with the unit name. */
|
|
@@ -744,6 +746,8 @@ interface ProductsScreenLabels {
|
|
|
744
746
|
errorTitle: string;
|
|
745
747
|
errorDescription: string;
|
|
746
748
|
errorRetry: string;
|
|
749
|
+
accessRestrictedTitle: string;
|
|
750
|
+
accessRestrictedDescription: string;
|
|
747
751
|
/**
|
|
748
752
|
* A focused row's accessible name. The row itself is the control that
|
|
749
753
|
* opens it, so the name says what Enter does. A template so locales own the
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ProductsWidget as e } from "../libs/tesouro-embedded-components-react/products-widget/feature/dist/
|
|
1
|
+
import { ProductsWidget as e } from "../libs/tesouro-embedded-components-react/products-widget/feature/dist/index10.js";
|
|
2
2
|
import "../libs/tesouro-embedded-components-react/products-widget/feature/dist/index.js";
|
|
3
3
|
export { e as ProductsWidget };
|
|
@@ -828,6 +828,8 @@ interface MeasureUnitsManagerLabels {
|
|
|
828
828
|
saveAction: string;
|
|
829
829
|
cancelAction: string;
|
|
830
830
|
emptyText: string;
|
|
831
|
+
/** Accessible label for the per-row actions-menu trigger button. */
|
|
832
|
+
moreActionsLabel: string;
|
|
831
833
|
}
|
|
832
834
|
interface MeasureUnitDeleteDialogLabels {
|
|
833
835
|
/** `{name}` is replaced with the unit name. */
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import { MARKETING_WIDGET_STATUS_LABELS_EN as e } from "./index4.js";
|
|
2
|
+
import { MARKETING_WIDGET_LABELS_EN as t } from "../../ui/dist/index2.js";
|
|
3
|
+
import { MarketingBenefitIcon as n } from "../../ui/dist/index3.js";
|
|
4
|
+
import { MarketingWidget as r } from "./index7.js";
|
|
5
|
+
export { t as MARKETING_WIDGET_LABELS_EN, e as MARKETING_WIDGET_STATUS_LABELS_EN, n as MarketingBenefitIcon, r as MarketingWidget };
|
|
@@ -3,6 +3,7 @@ var e = {
|
|
|
3
3
|
root: "marketing-widget",
|
|
4
4
|
learnMoreButton: "marketing-widget-learn-more-button",
|
|
5
5
|
applyNowButton: "marketing-widget-apply-now-button",
|
|
6
|
+
statusMessage: "marketing-widget-status-message",
|
|
6
7
|
modal: "marketing-widget-modal",
|
|
7
8
|
primaryCtaButton: "marketing-widget-primary-cta-button"
|
|
8
9
|
};
|
|
@@ -1,85 +1,37 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use client";
|
|
3
|
-
"use client";
|
|
4
|
-
"use client";
|
|
5
|
-
import { useOrganizationOnboardingSuppression as e } from "../../../shared/data-access/dist/lib/useOrganizationOnboardingSuppression.js";
|
|
6
|
-
import "../../../shared/data-access/dist/index.js";
|
|
7
|
-
import { useAnalyticsTrack as t } from "../../../shared/feature/dist/lib/analytics/hooks.js";
|
|
8
|
-
import { WidgetProvider as n } from "../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
|
|
9
|
-
import { useWidgetConfig as r } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
10
|
-
import "../../../shared/feature/dist/index.js";
|
|
11
|
-
import { MarketingWidgetAnalyticsEvent as i, WIDGET_NAME as a } from "./index2.js";
|
|
12
|
-
import { marketingWidgetTestIds as o } from "./index3.js";
|
|
13
|
-
import { MARKETING_WIDGET_LABELS_EN as s } from "../../ui/dist/index2.js";
|
|
14
|
-
import { MarketingBenefitIcon as c } from "../../ui/dist/index3.js";
|
|
15
|
-
import { MarketingWidget as l } from "../../ui/dist/index8.js";
|
|
16
|
-
import "../../ui/dist/index.js";
|
|
17
|
-
import { useCallback as u, useEffect as d, useState as f } from "react";
|
|
18
|
-
import { jsx as p } from "react/jsx-runtime";
|
|
19
1
|
//#region ../../libs/tesouro-embedded-components-react/marketing-widget/feature/dist/index4.js
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
"INACTIVE",
|
|
23
|
-
"INVITED"
|
|
24
|
-
]);
|
|
25
|
-
function h({ content: n, onPrimaryCtaClick: a, labels: s }) {
|
|
26
|
-
let c = t(), { initResponse: h } = r(), g = e(), [_, v] = f(!1);
|
|
27
|
-
d(() => {
|
|
28
|
-
c(i.Mounted);
|
|
29
|
-
}, [c]);
|
|
30
|
-
let y = u(() => {
|
|
31
|
-
c(i.OpenModal), v(!0);
|
|
32
|
-
}, [c]), b = u(() => {
|
|
33
|
-
v(!1);
|
|
34
|
-
}, []), x = u(() => {
|
|
35
|
-
c(i.PrimaryCta), v(!1), a();
|
|
36
|
-
}, [a, c]);
|
|
37
|
-
return !h?.status || m.has(h.status) || g.isSuppressed || !g.isResolved ? null : /* @__PURE__ */ p(l, {
|
|
38
|
-
open: _,
|
|
39
|
-
vspLogo: n.vspLogo,
|
|
40
|
-
bankingText: n.bankingText,
|
|
41
|
-
primaryCaption: n.primaryCaption,
|
|
42
|
-
secondaryCaption: n.secondaryCaption,
|
|
43
|
-
providedByCaption: n.providedByCaption,
|
|
44
|
-
primaryModalHeader: n.primaryModalHeader,
|
|
45
|
-
howItWorksHeader: n.howItWorksHeader,
|
|
46
|
-
howItWorksSteps: n.howItWorksSteps,
|
|
47
|
-
fromDayOneHeader: n.fromDayOneHeader,
|
|
48
|
-
benefits: n.benefits,
|
|
49
|
-
appearance: n.appearance,
|
|
50
|
-
onOpenMarketingModal: y,
|
|
51
|
-
onCloseMarketingModal: b,
|
|
52
|
-
onPrimaryCtaClick: x,
|
|
53
|
-
labels: s,
|
|
54
|
-
testIds: {
|
|
55
|
-
root: o.root,
|
|
56
|
-
learnMoreButton: o.learnMoreButton,
|
|
57
|
-
applyNowButton: o.applyNowButton,
|
|
58
|
-
modal: {
|
|
59
|
-
root: o.modal,
|
|
60
|
-
primaryCtaButton: o.primaryCtaButton
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
});
|
|
2
|
+
function e(e) {
|
|
3
|
+
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
64
4
|
}
|
|
65
|
-
function
|
|
66
|
-
return
|
|
67
|
-
widgetName: a,
|
|
68
|
-
baseUrl: e,
|
|
69
|
-
widgetToken: t,
|
|
70
|
-
organizationId: r,
|
|
71
|
-
configClient: i,
|
|
72
|
-
gatewayRouting: o,
|
|
73
|
-
linkComponent: s,
|
|
74
|
-
implementation: c,
|
|
75
|
-
uiFramework: l,
|
|
76
|
-
errorFallback: u,
|
|
77
|
-
onError: d,
|
|
78
|
-
analytics: f,
|
|
79
|
-
disclosuresAcceptance: m,
|
|
80
|
-
providerLabels: g,
|
|
81
|
-
children: /* @__PURE__ */ p(h, { ..._ })
|
|
82
|
-
});
|
|
5
|
+
function t({ applicantName: e, submittedOn: t }) {
|
|
6
|
+
return e && t ? [`Submitted by ${e} on ${t}.`] : e ? [`Submitted by ${e}.`] : t ? [`Submitted on ${t}.`] : [];
|
|
83
7
|
}
|
|
8
|
+
var n = {
|
|
9
|
+
chipLabel: "Under review",
|
|
10
|
+
heading: ({ bankName: e }) => `Your business's application is with ${e}.`,
|
|
11
|
+
body: (e) => [...t(e), `${e.applicantName ?? "The applicant"} will be contacted with updates.`]
|
|
12
|
+
}, r = {
|
|
13
|
+
resumeApplication: "Resume application",
|
|
14
|
+
bankNameFallback: "the bank",
|
|
15
|
+
formatDate: (e) => new Date(e).toLocaleDateString("en-US", {
|
|
16
|
+
month: "short",
|
|
17
|
+
day: "numeric",
|
|
18
|
+
year: "numeric"
|
|
19
|
+
}),
|
|
20
|
+
draftStartedByOther: {
|
|
21
|
+
chipLabel: "Application in progress",
|
|
22
|
+
heading: ({ startedOn: e }) => e ? `Your business already started applying on ${e}.` : "Your business already started applying.",
|
|
23
|
+
body: () => ["Only the user who started the application can finish it. If someone else needs to apply instead, the original applicant can cancel theirs so someone else can start one."]
|
|
24
|
+
},
|
|
25
|
+
submittedByYou: n,
|
|
26
|
+
submittedByOther: n,
|
|
27
|
+
deniedByYou: {
|
|
28
|
+
chipLabel: "Not approved",
|
|
29
|
+
body: ({ deniedOn: e }) => [e ? `Application denied on ${e}. Details have been sent to your email.` : "Application denied. Details have been sent to your email."]
|
|
30
|
+
},
|
|
31
|
+
deniedByOther: {
|
|
32
|
+
chipLabel: "Not approved",
|
|
33
|
+
body: ({ bankName: t, applicantName: n }) => [`${e(t)} was unable to approve your business's application.`, `${n ?? "The applicant"} has the details.`]
|
|
34
|
+
}
|
|
35
|
+
};
|
|
84
36
|
//#endregion
|
|
85
|
-
export {
|
|
37
|
+
export { r as MARKETING_WIDGET_STATUS_LABELS_EN };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
//#region ../../libs/tesouro-embedded-components-react/marketing-widget/feature/dist/index5.js
|
|
2
|
+
var e = {
|
|
3
|
+
Offer: "offer",
|
|
4
|
+
Resume: "resume",
|
|
5
|
+
DraftStartedByOther: "draftStartedByOther",
|
|
6
|
+
SubmittedByYou: "submittedByYou",
|
|
7
|
+
SubmittedByOther: "submittedByOther",
|
|
8
|
+
DeniedByYou: "deniedByYou",
|
|
9
|
+
DeniedByOther: "deniedByOther",
|
|
10
|
+
Hidden: "hidden"
|
|
11
|
+
}, t = 2592e6;
|
|
12
|
+
function n(e) {
|
|
13
|
+
if (e?.status !== "DENIED") return null;
|
|
14
|
+
let n = Date.parse(e.deniedAt ?? e.updatedAt);
|
|
15
|
+
return Number.isFinite(n) ? n + t : null;
|
|
16
|
+
}
|
|
17
|
+
function r(t, r = Date.now()) {
|
|
18
|
+
if (!t) return e.Offer;
|
|
19
|
+
let i = t.ownership === "STARTED_BY_YOU";
|
|
20
|
+
switch (t.status) {
|
|
21
|
+
case "COMPLETE": return e.Hidden;
|
|
22
|
+
case "DRAFT": return i ? e.Resume : e.DraftStartedByOther;
|
|
23
|
+
case "SUBMITTED": return i ? e.SubmittedByYou : e.SubmittedByOther;
|
|
24
|
+
case "DENIED": {
|
|
25
|
+
let a = n(t);
|
|
26
|
+
return a !== null && r > a ? e.Hidden : i ? e.DeniedByYou : e.DeniedByOther;
|
|
27
|
+
}
|
|
28
|
+
case "DELETED":
|
|
29
|
+
case "CANCELED": return e.Offer;
|
|
30
|
+
default: return e.Hidden;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
//#endregion
|
|
34
|
+
export { t as DENIED_NOTICE_DURATION_MS, e as MarketingApplicationView, n as deniedNoticeExpiresAt, r as marketingApplicationViewFor };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
//#region ../../libs/tesouro-embedded-components-react/marketing-widget/feature/dist/index6.js
|
|
2
|
+
var e = [
|
|
3
|
+
"COMPLETE",
|
|
4
|
+
"SUBMITTED",
|
|
5
|
+
"DRAFT",
|
|
6
|
+
"DENIED"
|
|
7
|
+
], t = /* @__PURE__ */ new Set(["DELETED", "CANCELED"]);
|
|
8
|
+
function n(e) {
|
|
9
|
+
return e.find((e) => e.ownership === "STARTED_BY_YOU") ?? e[0] ?? null;
|
|
10
|
+
}
|
|
11
|
+
function r(r) {
|
|
12
|
+
let i = r.filter((e) => e.product === "BANK_ACCOUNT" && !t.has(e.status));
|
|
13
|
+
for (let t of e) {
|
|
14
|
+
let e = i.filter((e) => e.status === t);
|
|
15
|
+
if (e.length > 0) return n(e);
|
|
16
|
+
}
|
|
17
|
+
return n(i);
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
20
|
+
export { r as selectBankAccountApplication };
|