@tesouro/embedded-components-react 0.10.15 → 0.11.0
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 +70 -6
- package/dist/index.d.ts +21 -2
- package/dist/index.js +56 -55
- package/dist/lib/WidgetProvider.d.ts +21 -2
- package/dist/lib/WidgetProvider.js +15 -13
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index27.js +54 -52
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/FileViewer/PdfFileViewer.js +23 -21
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/WidgetProvider.js +133 -130
- 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/ui/dist/lib/EmbeddedToaster.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/HostIsolationScope/HostIsolationScope.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/util/dist/index.js +3 -1
- package/dist/libs/tesouro-embedded-components-react/shared/util/dist/lib/csp.js +37 -0
- package/dist/libs/tesouro-embedded-components-react/shared/util/dist/lib/pdfWorkerSrc.js +9 -0
- package/dist/packages/shared-ui-shadcn/dist/index.js +4088 -4100
- package/dist/pdf.worker.min.mjs +28 -0
- package/package.json +13 -3
package/README.md
CHANGED
|
@@ -143,12 +143,13 @@ them inline.
|
|
|
143
143
|
|
|
144
144
|
### Entry points
|
|
145
145
|
|
|
146
|
-
| Import path
|
|
147
|
-
|
|
|
148
|
-
| `@tesouro/embedded-components-react`
|
|
149
|
-
| `@tesouro/embedded-components-react/styles.css`
|
|
150
|
-
| `@tesouro/embedded-components-react/
|
|
151
|
-
| `@tesouro/embedded-components-react/
|
|
146
|
+
| Import path | What you get |
|
|
147
|
+
| ------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
|
|
148
|
+
| `@tesouro/embedded-components-react` | All widgets, `WidgetSuite`, and the providers, including `RefreshingRootWidgetProvider`. |
|
|
149
|
+
| `@tesouro/embedded-components-react/styles.css` | The widget stylesheet. See [About the stylesheet](#about-the-stylesheet). |
|
|
150
|
+
| `@tesouro/embedded-components-react/pdf.worker.min.mjs` | The pdf.js worker, to self-host with `configureCsp()` under a strict CSP. Nothing imports it. |
|
|
151
|
+
| `@tesouro/embedded-components-react/core` | Framework-agnostic token utilities (`createWidgetTokenManager`). |
|
|
152
|
+
| `@tesouro/embedded-components-react/experimental` | Work in progress, with no compatibility promise. See [below](#experimental-entry-point). |
|
|
152
153
|
|
|
153
154
|
### Experimental entry point
|
|
154
155
|
|
|
@@ -165,6 +166,69 @@ all utilities are `ttw`-prefixed, so it won't collide with your own Tailwind.
|
|
|
165
166
|
Design tokens (`--ttw-*`) are declared on `:root` / `.dark`. Dark mode follows an
|
|
166
167
|
ancestor `.dark` class, and you can set the widget font with `--ttw-font-family`.
|
|
167
168
|
|
|
169
|
+
### Network access and Content Security Policy
|
|
170
|
+
|
|
171
|
+
The widgets run inside your page, so your Content Security Policy has to allow
|
|
172
|
+
the origins they reach. Each is first-party Tesouro infrastructure or a URL you
|
|
173
|
+
pass in; nothing is loaded from a third-party CDN.
|
|
174
|
+
|
|
175
|
+
| Origin | Directive | What for |
|
|
176
|
+
| ---------------------------------------------- | ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
177
|
+
| Your `baseUrl`, e.g. `https://api.tesouro.com` | `connect-src` | Every API call. Use `https://api.sandbox.tesouro.com` in sandbox. |
|
|
178
|
+
| `https://widgets.tesouro.com` | `script-src`; `blob:` in `worker-src` recommended | The pdf.js worker behind PDF previews in Bill Pay and Expenses. pdf.js loads a cross-origin worker through a blob wrapper; without `blob:` it falls back to the main thread, so previews still render, slower on large files. To skip this origin, self-host the worker the package ships at `@tesouro/embedded-components-react/pdf.worker.min.mjs` and call `configureCsp()`. |
|
|
179
|
+
| `https://z.tesouro.com` | `connect-src` | Anonymous usage analytics. Not contacted when the provider has `analytics={false}`. |
|
|
180
|
+
| The file URLs the API returns | `img-src`, `connect-src` | Receipt images and PDF documents a user opens; the API tells you the host for your environment. |
|
|
181
|
+
|
|
182
|
+
**You usually need no setup.** The widgets find your CSP nonce on the page,
|
|
183
|
+
from a `<meta property="csp-nonce" nonce="…">` tag or else from any
|
|
184
|
+
`<script nonce>`, and use the Tesouro CDN for the PDF worker. Call
|
|
185
|
+
`configureCsp()` once, before the widgets render, only to change either:
|
|
186
|
+
|
|
187
|
+
```ts
|
|
188
|
+
import { configureCsp } from '@tesouro/embedded-components-react';
|
|
189
|
+
|
|
190
|
+
configureCsp({
|
|
191
|
+
nonce: cspNonce, // only if the nonce found on the page is the wrong one
|
|
192
|
+
pdfWorkerSrc: '/assets/pdf.worker.min.mjs', // only to self-host the worker
|
|
193
|
+
});
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
Fields you leave out keep their current value, and `null` restores the default.
|
|
197
|
+
Both settings apply to the whole page.
|
|
198
|
+
|
|
199
|
+
| Your policy | What to do |
|
|
200
|
+
| ----------------------------------------- | -------------------------------------------------------------------------- |
|
|
201
|
+
| No CSP, or one without nonces | Nothing |
|
|
202
|
+
| Strict, allowing `widgets.tesouro.com` | Add `https://widgets.tesouro.com` to `script-src` |
|
|
203
|
+
| Strict, hosting everything on your origin | Self-host the PDF worker (below) and call `configureCsp({ pdfWorkerSrc })` |
|
|
204
|
+
|
|
205
|
+
**Self-hosting the PDF worker.** Copy the worker the package ships into your
|
|
206
|
+
static assets at build time and serve it as JavaScript. A same-origin worker
|
|
207
|
+
needs no `widgets.tesouro.com` entry and no `blob:`.
|
|
208
|
+
|
|
209
|
+
```ts
|
|
210
|
+
// Build step: copy this file to your static assets, e.g. /assets/pdf.worker.min.mjs
|
|
211
|
+
// require.resolve('@tesouro/embedded-components-react/pdf.worker.min.mjs')
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
Copy the file rather than importing it with a bundler `?url` suffix: a library
|
|
215
|
+
build inlines that as base64, which puts the worker back in your bundle.
|
|
216
|
+
|
|
217
|
+
**Styles.** The widget styles are all in `styles.css`. Two `<style>` tags are
|
|
218
|
+
added at run time:
|
|
219
|
+
|
|
220
|
+
- **Dialog scroll lock.** It carries your page's nonce, found as above when the
|
|
221
|
+
first dialog opens, so a strict `style-src` needs no `'unsafe-inline'` for it.
|
|
222
|
+
If it is blocked, dialogs still open but the page behind them can scroll.
|
|
223
|
+
- **Toasts.** The toast library ([sonner](https://sonner.emilkowal.ski)) adds
|
|
224
|
+
its stylesheet when the package loads and cannot take a nonce. A strict
|
|
225
|
+
`style-src` blocks it, so toasts render without their positioning. Allow it
|
|
226
|
+
with `'unsafe-inline'` until this is fixed.
|
|
227
|
+
|
|
228
|
+
If your policy blocks one of these, only that feature is affected: a PDF
|
|
229
|
+
preview reports a load error, analytics is dropped. The rest of the widget
|
|
230
|
+
still renders.
|
|
231
|
+
|
|
168
232
|
### Theming
|
|
169
233
|
|
|
170
234
|
Widgets read their look from `--ttw-*` CSS variables. Set them on `:root`, or
|
package/dist/index.d.ts
CHANGED
|
@@ -1429,6 +1429,25 @@ declare function themeIssues(input: Readonly<Record<string, string | undefined>>
|
|
|
1429
1429
|
declare function createTheme(input: ThemeInput): ThemeTokens;
|
|
1430
1430
|
declare function themeToCss(tokens: Readonly<ThemeTokens>, selector?: string): string;
|
|
1431
1431
|
|
|
1432
|
+
interface CspConfig {
|
|
1433
|
+
/**
|
|
1434
|
+
* Nonce for the one `<style>` tag the widgets add at runtime (the dialog
|
|
1435
|
+
* scroll lock). Found on the page when not set. `null` clears an override.
|
|
1436
|
+
*/
|
|
1437
|
+
nonce?: string | null;
|
|
1438
|
+
/**
|
|
1439
|
+
* URL of a self-hosted pdf.js worker. Defaults to the Tesouro CDN. `null`
|
|
1440
|
+
* restores the default.
|
|
1441
|
+
*/
|
|
1442
|
+
pdfWorkerSrc?: string | null;
|
|
1443
|
+
}
|
|
1444
|
+
/**
|
|
1445
|
+
* Page-wide overrides for hosts with a strict Content Security Policy. Fields
|
|
1446
|
+
* left out keep their current value. Global rather than a provider prop
|
|
1447
|
+
* because pdf.js and the scroll lock each keep one setting per page.
|
|
1448
|
+
*/
|
|
1449
|
+
declare function configureCsp(options: CspConfig): void;
|
|
1450
|
+
|
|
1432
1451
|
interface WidgetTokenRefreshProviderProps {
|
|
1433
1452
|
fetcher: WidgetTokenFetcher;
|
|
1434
1453
|
leadSeconds?: number;
|
|
@@ -6406,5 +6425,5 @@ interface CheckAmountAndDetailScreenProps {
|
|
|
6406
6425
|
|
|
6407
6426
|
type PendingFeatureStyleSources = CheckAmountAndDetailScreenProps | GapCoverageAlertProps | NoPolicyBannerProps;
|
|
6408
6427
|
|
|
6409
|
-
export { ACCEPT_DISCLOSURES_WIDGET_LABELS_EN, ADDITIONAL_OWNERS_LABELS_EN, APPLICATION_STATUS_LABELS_EN, AcceptDisclosuresWidget, BALANCES_WIDGET_LABELS_EN, BANKING_COMPLIANCE_BANNER_LABELS_EN, BUSINESS_DETAILS_LABELS_EN, BalancesWidget, BankAccountOnboardingWidget, BankAccountsWidget, BankingComplianceBannerWidget, BillPayWidget, CardDetailsWidget, CounterpartsWidget, CreditCardsWidget, CustomersWidget, DebitCardsWidget, ERROR_STATE_ID, ExpenseManagementWidget, HELP_FAQ_EN, INSIGHTS_FEATURE_LABELS_EN, INSIGHTS_WIDGET_LABELS_EN, InsightsWidget, LinkedAccountsWidget, OFFER_WIDGET_LABELS_EN, OFFER_WIDGET_STATUS_LABELS_EN, OfferBenefitIcon, OfferWidget, OnboardingSuppressionReason, PERSONAL_DETAILS_LABELS_EN, ProductsWidget, RESULT_LABELS_EN, ReceivablesWidget, RefreshingRootWidgetProvider, RootWidgetProvider, SINGLE_INSIGHT_LABELS_EN, Scope, SettingsSection, SettingsWidget, THEME_TOKEN_NAMES, 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, createTheme, getGlobalWidgetConfig, getGlobalWidgetInitState, isScope, registerDesignSystemEnsurer, registerUIRenderers, setGlobalWidgetConfig, subscribeToGlobalWidgetInitState, themeIssues, themeToCss, updateGlobalWidgetConfig, useDisclosuresAcceptanceSurface, useOwnWidgetConfig, useRefetchWidget, useWidgetConfig, useWidgetError, useWidgetInitStaleForToken, useWidgetLoading, useWidgetToken };
|
|
6410
|
-
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, BankingComplianceBannerLabels, BankingComplianceBannerWidgetProps, 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, 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, ThemeInput, ThemeIssue, ThemeTokenKey, ThemeTokenName, ThemeTokens, 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 };
|
|
6428
|
+
export { ACCEPT_DISCLOSURES_WIDGET_LABELS_EN, ADDITIONAL_OWNERS_LABELS_EN, APPLICATION_STATUS_LABELS_EN, AcceptDisclosuresWidget, BALANCES_WIDGET_LABELS_EN, BANKING_COMPLIANCE_BANNER_LABELS_EN, BUSINESS_DETAILS_LABELS_EN, BalancesWidget, BankAccountOnboardingWidget, BankAccountsWidget, BankingComplianceBannerWidget, BillPayWidget, CardDetailsWidget, CounterpartsWidget, CreditCardsWidget, CustomersWidget, DebitCardsWidget, ERROR_STATE_ID, ExpenseManagementWidget, HELP_FAQ_EN, INSIGHTS_FEATURE_LABELS_EN, INSIGHTS_WIDGET_LABELS_EN, InsightsWidget, LinkedAccountsWidget, OFFER_WIDGET_LABELS_EN, OFFER_WIDGET_STATUS_LABELS_EN, OfferBenefitIcon, OfferWidget, OnboardingSuppressionReason, PERSONAL_DETAILS_LABELS_EN, ProductsWidget, RESULT_LABELS_EN, ReceivablesWidget, RefreshingRootWidgetProvider, RootWidgetProvider, SINGLE_INSIGHT_LABELS_EN, Scope, SettingsSection, SettingsWidget, THEME_TOKEN_NAMES, 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, configureCsp, createTheme, getGlobalWidgetConfig, getGlobalWidgetInitState, isScope, registerDesignSystemEnsurer, registerUIRenderers, setGlobalWidgetConfig, subscribeToGlobalWidgetInitState, themeIssues, themeToCss, updateGlobalWidgetConfig, useDisclosuresAcceptanceSurface, useOwnWidgetConfig, useRefetchWidget, useWidgetConfig, useWidgetError, useWidgetInitStaleForToken, useWidgetLoading, useWidgetToken };
|
|
6429
|
+
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, BankingComplianceBannerLabels, BankingComplianceBannerWidgetProps, BillPayWidgetProps, BusinessDetailsLabels, BusinessDetailsValues, CardDetailsFeatureLabels, CardDetailsPanelLabels as CardDetailsWidgetLabels, CardDetailsWidgetProps, CardsFeatureLabels, CardsListLabels as CardsLabels, CardsPagination, CompanyStructureValue, ConfirmDeleteDialogLabels, CounterpartActionTarget, CounterpartDetailsSheetLabels, CounterpartFormSheetLabels, CounterpartMessageLabels, CounterpartMode, CounterpartsScreenLabels, CounterpartsWidgetProps, CreditCardsWidgetProps, CspConfig, 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, 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, ThemeInput, ThemeIssue, ThemeTokenKey, ThemeTokenName, ThemeTokens, 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
|
@@ -1,57 +1,58 @@
|
|
|
1
1
|
import { THEME_TOKEN_NAMES as e } from "./libs/tesouro-embedded-components-react/shared/util/dist/lib/theme/themeTokens.js";
|
|
2
2
|
import { createTheme as t, themeIssues as n, themeToCss as r } from "./libs/tesouro-embedded-components-react/shared/util/dist/lib/theme/createTheme.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
|
|
3
|
+
import { configureCsp as i } from "./libs/tesouro-embedded-components-react/shared/util/dist/lib/csp.js";
|
|
4
|
+
import { WIDGET_SUITE_LABELS_EN as a } from "./libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/labels.js";
|
|
5
|
+
import { WIDGET_SUITE_DEFAULT_SECTIONS as o, WidgetSuiteSectionId as s } from "./libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/sections/sectionIds.js";
|
|
6
|
+
import { cloneEmbeddedClient as c } from "./libs/tesouro-embedded-components-react/shared/data-access/dist/lib/createEmbeddedClient.js";
|
|
7
|
+
import { Scope as l, isScope as u } from "./libs/tesouro-embedded-components-react/shared/data-access/dist/lib/scopes.js";
|
|
8
|
+
import { OnboardingSuppressionReason as d } from "./libs/tesouro-embedded-components-react/shared/data-access/dist/lib/onboardingSuppressionReason.js";
|
|
9
|
+
import { UIFramework as f } from "./libs/tesouro-embedded-components-react/shared/ui/dist/lib/UIContext/UIContext.js";
|
|
10
|
+
import { registerDesignSystemEnsurer as p, registerUIRenderers as m } from "./libs/tesouro-embedded-components-react/shared/ui/dist/lib/UIContext/uiRendererRegistry.js";
|
|
11
|
+
import { ERROR_STATE_ID as h } from "./libs/tesouro-embedded-components-react/shared/ui/dist/lib/ErrorState/ErrorState.js";
|
|
12
|
+
import { getGlobalWidgetConfig as g, setGlobalWidgetConfig as _, updateGlobalWidgetConfig as v } from "./libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/globalStore.js";
|
|
13
|
+
import { getGlobalWidgetInitState as y, subscribeToGlobalWidgetInitState as b } from "./libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/widgetInitChannel.js";
|
|
14
|
+
import { RootWidgetProvider as x } from "./libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/RootWidgetProvider.js";
|
|
15
|
+
import { WidgetTokenRefreshProvider as S } from "./libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/WidgetTokenRefreshProvider.js";
|
|
16
|
+
import { useWidgetToken as C } from "./libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/useWidgetToken.js";
|
|
17
|
+
import { RefreshingRootWidgetProvider as w } from "./libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/RefreshingRootWidgetProvider.js";
|
|
18
|
+
import { useDisclosuresAcceptanceSurface as T, useOwnWidgetConfig as E, useRefetchWidget as D, useWidgetConfig as O, useWidgetError as k, useWidgetInitStaleForToken as A, useWidgetLoading as j } from "./libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
19
|
+
import { BankAccountsWidget as M } from "./libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/lib/BankAccountsWidget/BankAccountsWidget.js";
|
|
20
|
+
import { BillPayWidget as N } from "./libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidget/BillPayWidget.js";
|
|
21
|
+
import { CardDetailsWidget as P } from "./libs/tesouro-embedded-components-react/card-details-widget/feature/dist/lib/CardDetailsWidget.js";
|
|
22
|
+
import { CreditCardsWidget as F } from "./libs/tesouro-embedded-components-react/cards-widget/feature/dist/lib/CreditCardsWidget.js";
|
|
23
|
+
import { DebitCardsWidget as I } from "./libs/tesouro-embedded-components-react/cards-widget/feature/dist/lib/DebitCardsWidget.js";
|
|
24
|
+
import { BALANCES_WIDGET_LABELS_EN as L } from "./libs/tesouro-embedded-components-react/balances-widget/ui/dist/lib/BalancesWidget/labels.js";
|
|
25
|
+
import { BalancesWidget as R } from "./libs/tesouro-embedded-components-react/balances-widget/feature/dist/lib/BalancesWidget/BalancesWidgetFeature.js";
|
|
26
|
+
import { INSIGHTS_FEATURE_LABELS_EN as z } from "./libs/tesouro-embedded-components-react/insights-widget/feature/dist/lib/InsightsWidget/labels.js";
|
|
27
|
+
import { INSIGHTS_WIDGET_LABELS_EN as B } from "./libs/tesouro-embedded-components-react/insights-widget/ui/dist/lib/InsightsWidget/labels.js";
|
|
28
|
+
import { SINGLE_INSIGHT_LABELS_EN as V } from "./libs/tesouro-embedded-components-react/insights-widget/ui/dist/lib/InsightsWidget/SingleInsight/labels.js";
|
|
29
|
+
import { InsightsWidget as H } from "./libs/tesouro-embedded-components-react/insights-widget/feature/dist/lib/InsightsWidget/InsightsWidgetFeature.js";
|
|
30
|
+
import { ExpenseManagementWidget as U } from "./libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/lib/ExpenseManagementWidget/ExpenseManagementWidget.js";
|
|
31
|
+
import { ReceivablesWidget as W } from "./libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivablesWidget.js";
|
|
32
|
+
import { SettingsSection as G } from "./libs/tesouro-embedded-components-react/settings-widget/feature/dist/lib/SettingsWidget/sections.js";
|
|
33
|
+
import { HELP_FAQ_EN as K } from "./libs/tesouro-embedded-components-react/settings-widget/help/ui/contract/dist/index3.js";
|
|
34
|
+
import { SettingsWidget as q } from "./libs/tesouro-embedded-components-react/settings-widget/feature/dist/lib/SettingsWidget/SettingsWidget.js";
|
|
35
|
+
import { LinkedAccountsWidget as J } from "./libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/lib/LinkedAccountsWidget.js";
|
|
36
|
+
import { DEFAULT_FEATURE_LABELS as Y } from "./libs/tesouro-embedded-components-react/transfers-widget/feature/dist/lib/TransfersWidget/featureLabels.js";
|
|
37
|
+
import { TRANSFERS_WIDGET_LABELS_EN as X } from "./libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransfersWidget/labels.js";
|
|
38
|
+
import { TransfersWidget as Z } from "./libs/tesouro-embedded-components-react/transfers-widget/feature/dist/lib/TransfersWidget/TransfersWidgetFeature.js";
|
|
39
|
+
import { ACCEPT_DISCLOSURES_WIDGET_LABELS_EN as Q } from "./libs/tesouro-embedded-components-react/accept-disclosures-widget/ui/dist/lib/AcceptDisclosuresWidget/labels.js";
|
|
40
|
+
import { AcceptDisclosuresWidget as $ } from "./libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/lib/AcceptDisclosuresWidget/AcceptDisclosuresWidget.js";
|
|
41
|
+
import { ADDITIONAL_OWNERS_LABELS_EN as ee } from "./libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index9.js";
|
|
42
|
+
import { BUSINESS_DETAILS_LABELS_EN as te } from "./libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index12.js";
|
|
43
|
+
import { PERSONAL_DETAILS_LABELS_EN as ne } from "./libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index13.js";
|
|
44
|
+
import { RESULT_LABELS_EN as re } from "./libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index20.js";
|
|
45
|
+
import { APPLICATION_STATUS_LABELS_EN as ie } from "./libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/labels.js";
|
|
46
|
+
import { BankAccountOnboardingWidget as ae } from "./libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/BankAccountOnboardingWidget.js";
|
|
47
|
+
import { WidgetSuite as oe } from "./libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/WidgetSuite.js";
|
|
48
|
+
import { BANKING_COMPLIANCE_BANNER_LABELS_EN as se } from "./libs/tesouro-embedded-components-react/banking-compliance-banner-widget/ui/dist/index3.js";
|
|
49
|
+
import { BankingComplianceBannerWidget as ce } from "./libs/tesouro-embedded-components-react/banking-compliance-banner-widget/feature/dist/lib/BankingComplianceBannerWidget/BankingComplianceBannerWidget.js";
|
|
50
|
+
import { CounterpartsWidget as le } from "./lib/CounterpartsWidgetPublic.js";
|
|
51
|
+
import { CustomersWidget as ue } from "./libs/tesouro-embedded-components-react/customers-widget/feature/dist/lib/CustomersWidget/CustomersWidget.js";
|
|
52
|
+
import { OFFER_WIDGET_STATUS_LABELS_EN as de } from "./libs/tesouro-embedded-components-react/offer-widget/feature/dist/lib/OfferWidget/labels.js";
|
|
53
|
+
import { OFFER_WIDGET_LABELS_EN as fe } from "./libs/tesouro-embedded-components-react/offer-widget/ui/dist/index2.js";
|
|
54
|
+
import { OfferBenefitIcon as pe } from "./libs/tesouro-embedded-components-react/offer-widget/ui/dist/index3.js";
|
|
55
|
+
import { OfferWidget as me } from "./libs/tesouro-embedded-components-react/offer-widget/feature/dist/lib/OfferWidget/OfferWidget.js";
|
|
56
|
+
import { ProductsWidget as he } from "./libs/tesouro-embedded-components-react/products-widget/feature/dist/lib/ProductsWidget/ProductsWidget.js";
|
|
57
|
+
import { WidgetProvider as ge } from "./lib/WidgetProviderPublic.js";
|
|
58
|
+
export { Q as ACCEPT_DISCLOSURES_WIDGET_LABELS_EN, ee as ADDITIONAL_OWNERS_LABELS_EN, ie as APPLICATION_STATUS_LABELS_EN, $ as AcceptDisclosuresWidget, L as BALANCES_WIDGET_LABELS_EN, se as BANKING_COMPLIANCE_BANNER_LABELS_EN, te as BUSINESS_DETAILS_LABELS_EN, R as BalancesWidget, ae as BankAccountOnboardingWidget, M as BankAccountsWidget, ce as BankingComplianceBannerWidget, N as BillPayWidget, P as CardDetailsWidget, le as CounterpartsWidget, F as CreditCardsWidget, ue as CustomersWidget, I as DebitCardsWidget, h as ERROR_STATE_ID, U as ExpenseManagementWidget, K as HELP_FAQ_EN, z as INSIGHTS_FEATURE_LABELS_EN, B as INSIGHTS_WIDGET_LABELS_EN, H as InsightsWidget, J as LinkedAccountsWidget, fe as OFFER_WIDGET_LABELS_EN, de as OFFER_WIDGET_STATUS_LABELS_EN, pe as OfferBenefitIcon, me as OfferWidget, d as OnboardingSuppressionReason, ne as PERSONAL_DETAILS_LABELS_EN, he as ProductsWidget, re as RESULT_LABELS_EN, W as ReceivablesWidget, w as RefreshingRootWidgetProvider, x as RootWidgetProvider, V as SINGLE_INSIGHT_LABELS_EN, l as Scope, G as SettingsSection, q as SettingsWidget, e as THEME_TOKEN_NAMES, Y as TRANSFERS_FEATURE_LABELS_EN, X as TRANSFERS_WIDGET_LABELS_EN, Z as TransfersWidget, f as UIFramework, o as WIDGET_SUITE_DEFAULT_SECTIONS, a as WIDGET_SUITE_LABELS_EN, ge as WidgetProvider, oe as WidgetSuite, s as WidgetSuiteSectionId, S as WidgetTokenRefreshProvider, c as cloneEmbeddedClient, i as configureCsp, t as createTheme, g as getGlobalWidgetConfig, y as getGlobalWidgetInitState, u as isScope, p as registerDesignSystemEnsurer, m as registerUIRenderers, _ as setGlobalWidgetConfig, b as subscribeToGlobalWidgetInitState, n as themeIssues, r as themeToCss, v as updateGlobalWidgetConfig, T as useDisclosuresAcceptanceSurface, E as useOwnWidgetConfig, D as useRefetchWidget, O as useWidgetConfig, k as useWidgetError, A as useWidgetInitStaleForToken, j as useWidgetLoading, C as useWidgetToken };
|
|
@@ -1009,6 +1009,25 @@ interface WidgetTokenManager {
|
|
|
1009
1009
|
subscribe(listener: () => void): () => void;
|
|
1010
1010
|
}
|
|
1011
1011
|
|
|
1012
|
+
interface CspConfig {
|
|
1013
|
+
/**
|
|
1014
|
+
* Nonce for the one `<style>` tag the widgets add at runtime (the dialog
|
|
1015
|
+
* scroll lock). Found on the page when not set. `null` clears an override.
|
|
1016
|
+
*/
|
|
1017
|
+
nonce?: string | null;
|
|
1018
|
+
/**
|
|
1019
|
+
* URL of a self-hosted pdf.js worker. Defaults to the Tesouro CDN. `null`
|
|
1020
|
+
* restores the default.
|
|
1021
|
+
*/
|
|
1022
|
+
pdfWorkerSrc?: string | null;
|
|
1023
|
+
}
|
|
1024
|
+
/**
|
|
1025
|
+
* Page-wide overrides for hosts with a strict Content Security Policy. Fields
|
|
1026
|
+
* left out keep their current value. Global rather than a provider prop
|
|
1027
|
+
* because pdf.js and the scroll lock each keep one setting per page.
|
|
1028
|
+
*/
|
|
1029
|
+
declare function configureCsp(options: CspConfig): void;
|
|
1030
|
+
|
|
1012
1031
|
interface WidgetTokenRefreshProviderProps {
|
|
1013
1032
|
fetcher: WidgetTokenFetcher;
|
|
1014
1033
|
leadSeconds?: number;
|
|
@@ -1272,5 +1291,5 @@ declare function useWidgetToken(): UseWidgetTokenResult;
|
|
|
1272
1291
|
*/
|
|
1273
1292
|
declare function WidgetProvider(props: PropsWithChildren<WidgetProviderProps>): ReactNode;
|
|
1274
1293
|
|
|
1275
|
-
export { ERROR_STATE_ID, RefreshingRootWidgetProvider, RootWidgetProvider, UIFramework, WidgetProvider, WidgetTokenRefreshProvider, cloneEmbeddedClient, getGlobalWidgetConfig, getGlobalWidgetInitState, registerDesignSystemEnsurer, registerUIRenderers, setGlobalWidgetConfig, subscribeToGlobalWidgetInitState, updateGlobalWidgetConfig, useDisclosuresAcceptanceSurface, useOwnWidgetConfig, useRefetchWidget, useWidgetConfig, useWidgetError, useWidgetInitStaleForToken, useWidgetLoading, useWidgetToken };
|
|
1276
|
-
export type { EmbeddedClient, LinkComponent, LinkComponentProps, RefreshingRootWidgetProviderProps, RootWidgetProviderProps, WidgetConfig, WidgetConfigInput, WidgetInitResponse, WidgetInitState, WidgetProviderLabels, WidgetProviderProps, WidgetTokenFetcher, WidgetTokenManager, WidgetTokenRefreshProviderProps, WidgetTokenState };
|
|
1294
|
+
export { ERROR_STATE_ID, RefreshingRootWidgetProvider, RootWidgetProvider, UIFramework, WidgetProvider, WidgetTokenRefreshProvider, cloneEmbeddedClient, configureCsp, getGlobalWidgetConfig, getGlobalWidgetInitState, registerDesignSystemEnsurer, registerUIRenderers, setGlobalWidgetConfig, subscribeToGlobalWidgetInitState, updateGlobalWidgetConfig, useDisclosuresAcceptanceSurface, useOwnWidgetConfig, useRefetchWidget, useWidgetConfig, useWidgetError, useWidgetInitStaleForToken, useWidgetLoading, useWidgetToken };
|
|
1295
|
+
export type { CspConfig, EmbeddedClient, LinkComponent, LinkComponentProps, RefreshingRootWidgetProviderProps, RootWidgetProviderProps, WidgetConfig, WidgetConfigInput, WidgetInitResponse, WidgetInitState, WidgetProviderLabels, WidgetProviderProps, WidgetTokenFetcher, WidgetTokenManager, WidgetTokenRefreshProviderProps, WidgetTokenState };
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { configureCsp as e } from "../libs/tesouro-embedded-components-react/shared/util/dist/lib/csp.js";
|
|
2
|
+
import "../libs/tesouro-embedded-components-react/shared/util/dist/index.js";
|
|
3
|
+
import { cloneEmbeddedClient as t } from "../libs/tesouro-embedded-components-react/shared/data-access/dist/lib/createEmbeddedClient.js";
|
|
4
|
+
import { UIFramework as n } from "../libs/tesouro-embedded-components-react/shared/ui/dist/lib/UIContext/UIContext.js";
|
|
5
|
+
import { registerDesignSystemEnsurer as r, registerUIRenderers as i } from "../libs/tesouro-embedded-components-react/shared/ui/dist/lib/UIContext/uiRendererRegistry.js";
|
|
6
|
+
import { ERROR_STATE_ID as a } from "../libs/tesouro-embedded-components-react/shared/ui/dist/lib/ErrorState/ErrorState.js";
|
|
5
7
|
import "../libs/tesouro-embedded-components-react/shared/ui/dist/index.js";
|
|
6
|
-
import { getGlobalWidgetConfig as
|
|
7
|
-
import { getGlobalWidgetInitState as
|
|
8
|
-
import { RootWidgetProvider as
|
|
9
|
-
import { WidgetTokenRefreshProvider as
|
|
10
|
-
import { useWidgetToken as
|
|
11
|
-
import { RefreshingRootWidgetProvider as
|
|
12
|
-
import { useDisclosuresAcceptanceSurface as
|
|
8
|
+
import { getGlobalWidgetConfig as o, setGlobalWidgetConfig as s, updateGlobalWidgetConfig as c } from "../libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/globalStore.js";
|
|
9
|
+
import { getGlobalWidgetInitState as l, subscribeToGlobalWidgetInitState as u } from "../libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/widgetInitChannel.js";
|
|
10
|
+
import { RootWidgetProvider as d } from "../libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/RootWidgetProvider.js";
|
|
11
|
+
import { WidgetTokenRefreshProvider as f } from "../libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/WidgetTokenRefreshProvider.js";
|
|
12
|
+
import { useWidgetToken as p } from "../libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/useWidgetToken.js";
|
|
13
|
+
import { RefreshingRootWidgetProvider as m } from "../libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/RefreshingRootWidgetProvider.js";
|
|
14
|
+
import { useDisclosuresAcceptanceSurface as h, useOwnWidgetConfig as g, useRefetchWidget as _, useWidgetConfig as v, useWidgetError as y, useWidgetInitStaleForToken as b, useWidgetLoading as x } from "../libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
13
15
|
import "../libs/tesouro-embedded-components-react/shared/feature/dist/index.js";
|
|
14
|
-
import { WidgetProvider as
|
|
15
|
-
export {
|
|
16
|
+
import { WidgetProvider as S } from "./WidgetProviderPublic.js";
|
|
17
|
+
export { a as ERROR_STATE_ID, m as RefreshingRootWidgetProvider, d as RootWidgetProvider, n as UIFramework, S as WidgetProvider, f as WidgetTokenRefreshProvider, t as cloneEmbeddedClient, e as configureCsp, o as getGlobalWidgetConfig, l as getGlobalWidgetInitState, r as registerDesignSystemEnsurer, i as registerUIRenderers, s as setGlobalWidgetConfig, u as subscribeToGlobalWidgetInitState, c as updateGlobalWidgetConfig, h as useDisclosuresAcceptanceSurface, g as useOwnWidgetConfig, _ as useRefetchWidget, v as useWidgetConfig, y as useWidgetError, b as useWidgetInitStaleForToken, x as useWidgetLoading, p as useWidgetToken };
|