@tesouro/embedded-components-react 0.2.266 → 0.2.269
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 +15 -12
- package/dist/experimental/WidgetSuite.d.ts +25 -1
- package/dist/experimental/index.d.ts +25 -1
- package/dist/index.css +45 -9
- package/dist/index.d.ts +46 -22
- package/dist/index.js +1 -1
- package/dist/lib/AcceptDisclosuresWidget.d.ts +25 -1
- package/dist/lib/BalancesWidget.d.ts +24 -0
- package/dist/lib/BankAccountOnboardingWidget.d.ts +25 -1
- package/dist/lib/BankAccountsWidget.d.ts +25 -1
- package/dist/lib/BillPayWidget.d.ts +24 -0
- package/dist/lib/BillPayWidget.js +1 -1
- package/dist/lib/CardDetailsWidget.d.ts +25 -1
- package/dist/lib/CardsWidget.d.ts +25 -1
- package/dist/lib/ChartOfAccountsWidget.d.ts +25 -1
- package/dist/lib/CounterpartsWidget.d.ts +25 -1
- package/dist/lib/CreateCardWidget.d.ts +25 -1
- package/dist/lib/ExpenseApprovalPoliciesWidget.d.ts +25 -1
- package/dist/lib/ExpenseManagementWidget.d.ts +25 -1
- package/dist/lib/ExpenseRequirementsWidget.d.ts +25 -1
- package/dist/lib/HelpWidget.d.ts +25 -1
- package/dist/lib/InsightsWidget.d.ts +24 -0
- package/dist/lib/InvoicingWidget.d.ts +25 -1
- package/dist/lib/LinkedAccountsWidget.d.ts +25 -1
- package/dist/lib/ProductsWidget.d.ts +25 -1
- package/dist/lib/ProfileWidget.d.ts +25 -1
- package/dist/lib/ReceiptMatchWidget.d.ts +25 -1
- package/dist/lib/ReceivablesWidget.d.ts +25 -1
- package/dist/lib/SettingsWidget.d.ts +25 -1
- package/dist/lib/TagsWidget.d.ts +25 -1
- package/dist/lib/TeamWidget.d.ts +25 -1
- package/dist/lib/TransfersWidget.d.ts +24 -0
- package/dist/lib/WidgetProvider.d.ts +25 -1
- package/dist/lib/WidgetProviderPublic.d.ts +24 -0
- package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/index4.js +9 -8
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index17.js +122 -121
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/index8.js +9 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index10.js +99 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index11.js +7 -97
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index12.js +99 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index13.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index14.js +2 -41
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index15.js +44 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index16.js +1 -50
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index17.js +48 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index18.js +9 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index19.js +8 -91
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index2.js +6 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index20.js +7 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index21.js +100 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index22.js +3 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index23.js +6 -83
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index24.js +9 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +83 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index26.js +2 -111
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index27.js +8 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index28.js +104 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index29.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index30.js +25 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index6.js +37 -27
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index7.js +15 -116
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index8.js +126 -31
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index9.js +32 -69
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index12.js +0 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index13.js +34 -69
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index15.js +4 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index16.js +261 -181
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index28.js +32 -33
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index7.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index6.js +9 -8
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index8.js +9 -8
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/index8.js +9 -8
- package/dist/libs/tesouro-embedded-components-react/create-card-widget/feature/dist/index7.js +94 -93
- package/dist/libs/tesouro-embedded-components-react/expense-approval-policies-widget/feature/dist/lib/ExpenseApprovalPoliciesWidgetFeature.js +7 -6
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index3.js +9 -8
- package/dist/libs/tesouro-embedded-components-react/expense-receipt-match-widget/feature/dist/lib/ReceiptMatchWidget.js +12 -11
- package/dist/libs/tesouro-embedded-components-react/expense-requirements-widget/feature/dist/lib/ExpenseRequirementsWidget.js +7 -6
- package/dist/libs/tesouro-embedded-components-react/gl-code-table-widget/feature/dist/index8.js +9 -8
- package/dist/libs/tesouro-embedded-components-react/help-widget/feature/dist/index3.js +9 -8
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index12.js +9 -8
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index3.js +10 -9
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/index9.js +9 -8
- package/dist/libs/tesouro-embedded-components-react/products-widget/feature/dist/index8.js +9 -8
- package/dist/libs/tesouro-embedded-components-react/profile-widget/feature/dist/index4.js +9 -8
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index6.js +10 -9
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +22 -21
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/widgetGatewayHosts.js +14 -0
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/RootWidgetProvider.js +76 -67
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/WidgetProvider.js +107 -101
- 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/feature/dist/lib/analytics/client.js +12 -4
- package/dist/libs/tesouro-embedded-components-react/tags-widget/feature/dist/index11.js +9 -8
- package/dist/libs/tesouro-embedded-components-react/team-widget/feature/dist/index17.js +106 -105
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index5.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index6.js +9 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -107,18 +107,19 @@ App-level provider. Resolves `baseUrl` / `widgetToken` / `organizationId` (falli
|
|
|
107
107
|
|
|
108
108
|
#### Props
|
|
109
109
|
|
|
110
|
-
| Prop | Type | Description
|
|
111
|
-
| ------------------------------- | -------------------------------------------- |
|
|
112
|
-
| `baseUrl` | `string` | Base URL of the Tesouro embedded API (e.g. `"https://api.tesouro.com"`). Falls back to `global.baseUrl` when omitted.
|
|
113
|
-
| `widgetToken` | `string \| null` | Bearer token for widget auth. Falls back to `global.widgetToken` when omitted. Pass `null` to suppress auth.
|
|
114
|
-
| `organizationId` | `string \| null` | Org ID forwarded to data-access hooks. Falls back to `global.organizationId` when omitted; if still unset, defaults to `initResponse.organizationId` once the fetch resolves. Pass `null` to clear org scoping (never falls back).
|
|
115
|
-
| `configClient` | `(client: EmbeddedClient) => EmbeddedClient` | Optional post-creation hook for the HTTP client. Called after the built-in auth
|
|
116
|
-
| `
|
|
117
|
-
| `
|
|
118
|
-
| `
|
|
119
|
-
| `
|
|
120
|
-
| `
|
|
121
|
-
| `
|
|
110
|
+
| Prop | Type | Description |
|
|
111
|
+
| ------------------------------- | -------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
112
|
+
| `baseUrl` | `string` | Base URL of the Tesouro embedded API (e.g. `"https://api.tesouro.com"`). Falls back to `global.baseUrl` when omitted. |
|
|
113
|
+
| `widgetToken` | `string \| null` | Bearer token for widget auth. Falls back to `global.widgetToken` when omitted. Pass `null` to suppress auth. |
|
|
114
|
+
| `organizationId` | `string \| null` | Org ID forwarded to data-access hooks. Falls back to `global.organizationId` when omitted; if still unset, defaults to `initResponse.organizationId` once the fetch resolves. Pass `null` to clear org scoping (never falls back). |
|
|
115
|
+
| `configClient` | `(client: EmbeddedClient) => EmbeddedClient` | Optional post-creation hook for the HTTP client. Called after the built-in auth and gateway-routing interceptors. Falls back to `global.configClient`. |
|
|
116
|
+
| `gatewayRouting` | `boolean` | Overrides widget-gateway routing (the `/api/widget-gateway/proxy` path prefix plus the `X-Widget-Token` header). Unset, routing applies per request when the request origin is a known Tesouro API host; `true` forces it on (e.g. a custom domain in front of the gateway), `false` forces it off (a host that routes its own requests). Falls back to `global.gatewayRouting`. |
|
|
117
|
+
| `linkComponent` | `LinkComponent` | Host link component widgets use to render navigational links. Falls back to `global.linkComponent`. |
|
|
118
|
+
| `uiFramework` | `'shadcn' \| 'tecton' \| null` | UI framework the widget UI layer renders with for this tree. Falls back to `global.uiFramework`, then to `'shadcn'`. See UI framework selection. |
|
|
119
|
+
| `implementation` | `'native' \| 'monite' \| null` | Which implementation the widgets render with for this tree. Falls back to `global.implementation`, then to `'native'`. See Implementation selection. |
|
|
120
|
+
| `analytics` | `boolean` | Enables anonymous analytics for this provider tree (default `true`). `RootWidgetProvider` is the analytics owner; set `false` to disable capture and skip loading PostHog. |
|
|
121
|
+
| `unstable_initResponseOverride` | `WidgetInitResponse` | First-party hosts only. Skips the `GET /api/widget-gateway/init` fetch and exposes this host-authored object as `initResponse` to the subtree. Use when the host authenticates users directly against the Tesouro issuer and passes the user's bearer access token as `widgetToken`. Embed integrations minting widget JWEs must leave this unset. |
|
|
122
|
+
| `children` | `ReactNode` | The React subtree that consumes the widget context. |
|
|
122
123
|
|
|
123
124
|
### `WidgetProvider`
|
|
124
125
|
|
|
@@ -132,6 +133,7 @@ Mid-tree or standalone provider. With no props it is a transparent pass-through
|
|
|
132
133
|
| `widgetToken` | `string \| null` | Override the widget token for this subtree. Triggers a new `/api/widget-gateway/init` fetch. Pass `null` to suppress auth at this level. When omitted, inherits from parent. |
|
|
133
134
|
| `organizationId` | `string \| null` | Override the org ID for this subtree. Does **not** trigger a re-fetch on its own. When omitted, inherits from parent; if unset through the whole cascade, defaults to this level's `initResponse.organizationId` (an ancestor's explicit org wins over it). Pass `null` to explicitly clear org scoping (never falls back). |
|
|
134
135
|
| `configClient` | `(client: EmbeddedClient) => EmbeddedClient` | Optional post-creation hook for the scoped HTTP client. Only called when this provider creates its own client (i.e. not in pass-through mode). When omitted, inherits from parent. |
|
|
136
|
+
| `gatewayRouting` | `boolean` | Overrides widget-gateway routing (the `/api/widget-gateway/proxy` path prefix plus the `X-Widget-Token` header) for this subtree's scoped client. Unset, routing applies per request when the request origin is a known Tesouro API host; `true` forces it on, `false` forces it off. When omitted, inherits from parent. |
|
|
135
137
|
| `linkComponent` | `LinkComponent` | Override the host link component for this subtree. When omitted, inherits from parent. |
|
|
136
138
|
| `uiFramework` | `'shadcn' \| 'tecton' \| null` | Override the UI framework for this subtree. When omitted (or `null`), inherits the nearest ancestor's selection, defaulting to `'shadcn'`. See UI framework selection. |
|
|
137
139
|
| `implementation` | `'native' \| 'monite' \| null` | Override the implementation for this subtree. When omitted (or `null`), inherits the nearest ancestor's selection, defaulting to `'native'`. See Implementation selection. |
|
|
@@ -164,6 +166,7 @@ Bundles `WidgetTokenRefreshProvider` + `RootWidgetProvider` and wires the live t
|
|
|
164
166
|
| `baseUrl` | `RootWidgetProvider` | Falls back to the global store when omitted. |
|
|
165
167
|
| `organizationId` | `RootWidgetProvider` | Pass `null` to clear the org scope; falls back to the global store when omitted. |
|
|
166
168
|
| `configClient` | `RootWidgetProvider` | Optional post-creation hook for the scoped HTTP client. |
|
|
169
|
+
| `gatewayRouting` | `RootWidgetProvider` | Overrides widget-gateway routing; unset, it applies per request when the request origin is a known Tesouro API host. |
|
|
167
170
|
| `linkComponent` | `RootWidgetProvider` | Component used in place of plain `<a>` tags inside widgets. |
|
|
168
171
|
| `uiFramework` | `RootWidgetProvider` | `'shadcn'` (default) or `'tecton'`; inherits down the provider cascade. |
|
|
169
172
|
| `implementation` | `RootWidgetProvider` | `'native'` (default) or `'monite'`; inherits down the provider cascade. |
|
|
@@ -506,6 +506,30 @@ interface WidgetConfigInput {
|
|
|
506
506
|
* ```
|
|
507
507
|
*/
|
|
508
508
|
configClient?: (client: EmbeddedClient) => EmbeddedClient;
|
|
509
|
+
/**
|
|
510
|
+
* Overrides the widget-gateway routing decision for the scoped HTTP client.
|
|
511
|
+
*
|
|
512
|
+
* Any caller reaching the Tesouro API with a widget token must route data
|
|
513
|
+
* requests through the widget gateway: prefix the path with
|
|
514
|
+
* `/api/widget-gateway/proxy` and carry the token as `X-Widget-Token`. The
|
|
515
|
+
* provider applies both automatically per request when the request origin is
|
|
516
|
+
* a known Tesouro API host (`WIDGET_GATEWAY_HOSTS`, derived from the
|
|
517
|
+
* generated `ClientOptions['baseUrl']`); `/api/widget-gateway/*` paths (the
|
|
518
|
+
* init round-trip) always pass through untouched.
|
|
519
|
+
*
|
|
520
|
+
* - `undefined` — decide from the request origin, as above. Inherits from
|
|
521
|
+
* the nearest ancestor or global store like every other config field.
|
|
522
|
+
* - `true` — always apply the rewrite, even for an unlisted base URL (e.g. a
|
|
523
|
+
* custom domain in front of the gateway).
|
|
524
|
+
* - `false` — never apply it. For hosts that route widget requests their own
|
|
525
|
+
* way, such as a same-origin BFF whose `configClient` retargets every
|
|
526
|
+
* request.
|
|
527
|
+
*
|
|
528
|
+
* Independent of {@link configClient}: a host that only adds a header keeps
|
|
529
|
+
* the built-in routing, and the built-in interceptor runs before any
|
|
530
|
+
* `configClient` interceptor.
|
|
531
|
+
*/
|
|
532
|
+
gatewayRouting?: boolean;
|
|
509
533
|
/**
|
|
510
534
|
* Component the embedded widgets should render in place of plain `<a>` tags.
|
|
511
535
|
*
|
|
@@ -817,7 +841,7 @@ interface WidgetSuiteProps extends WidgetProviderProps {
|
|
|
817
841
|
* deep-linking, and is deliberately not invented on an experimental export
|
|
818
842
|
* before a host asks for it.
|
|
819
843
|
*/
|
|
820
|
-
declare function WidgetSuite({ baseUrl, widgetToken, organizationId, configClient, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, ...innerProps }: WidgetSuiteProps): React.JSX.Element;
|
|
844
|
+
declare function WidgetSuite({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, ...innerProps }: WidgetSuiteProps): React.JSX.Element;
|
|
821
845
|
|
|
822
846
|
export { WIDGET_SUITE_CONTENT_LABELS_EN, WIDGET_SUITE_DEFAULT_SECTIONS, WIDGET_SUITE_DISCLOSURE_LABELS_EN, WIDGET_SUITE_SECTION_LABELS_EN, WIDGET_SUITE_SECTION_TITLE_LABELS_EN, WIDGET_SUITE_SHELL_LABELS_EN, WidgetSuite, WidgetSuiteSectionId };
|
|
823
847
|
export type { AcceptDisclosuresLinks, PartialDeep, WidgetSuiteContentLabels, WidgetSuiteDisclosureLabels, WidgetSuiteProps, WidgetSuiteSectionLabels, WidgetSuiteSectionTitleLabels, WidgetSuiteShellLabels };
|
|
@@ -506,6 +506,30 @@ interface WidgetConfigInput {
|
|
|
506
506
|
* ```
|
|
507
507
|
*/
|
|
508
508
|
configClient?: (client: EmbeddedClient) => EmbeddedClient;
|
|
509
|
+
/**
|
|
510
|
+
* Overrides the widget-gateway routing decision for the scoped HTTP client.
|
|
511
|
+
*
|
|
512
|
+
* Any caller reaching the Tesouro API with a widget token must route data
|
|
513
|
+
* requests through the widget gateway: prefix the path with
|
|
514
|
+
* `/api/widget-gateway/proxy` and carry the token as `X-Widget-Token`. The
|
|
515
|
+
* provider applies both automatically per request when the request origin is
|
|
516
|
+
* a known Tesouro API host (`WIDGET_GATEWAY_HOSTS`, derived from the
|
|
517
|
+
* generated `ClientOptions['baseUrl']`); `/api/widget-gateway/*` paths (the
|
|
518
|
+
* init round-trip) always pass through untouched.
|
|
519
|
+
*
|
|
520
|
+
* - `undefined` — decide from the request origin, as above. Inherits from
|
|
521
|
+
* the nearest ancestor or global store like every other config field.
|
|
522
|
+
* - `true` — always apply the rewrite, even for an unlisted base URL (e.g. a
|
|
523
|
+
* custom domain in front of the gateway).
|
|
524
|
+
* - `false` — never apply it. For hosts that route widget requests their own
|
|
525
|
+
* way, such as a same-origin BFF whose `configClient` retargets every
|
|
526
|
+
* request.
|
|
527
|
+
*
|
|
528
|
+
* Independent of {@link configClient}: a host that only adds a header keeps
|
|
529
|
+
* the built-in routing, and the built-in interceptor runs before any
|
|
530
|
+
* `configClient` interceptor.
|
|
531
|
+
*/
|
|
532
|
+
gatewayRouting?: boolean;
|
|
509
533
|
/**
|
|
510
534
|
* Component the embedded widgets should render in place of plain `<a>` tags.
|
|
511
535
|
*
|
|
@@ -817,7 +841,7 @@ interface WidgetSuiteProps extends WidgetProviderProps {
|
|
|
817
841
|
* deep-linking, and is deliberately not invented on an experimental export
|
|
818
842
|
* before a host asks for it.
|
|
819
843
|
*/
|
|
820
|
-
declare function WidgetSuite({ baseUrl, widgetToken, organizationId, configClient, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, ...innerProps }: WidgetSuiteProps): React.JSX.Element;
|
|
844
|
+
declare function WidgetSuite({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, ...innerProps }: WidgetSuiteProps): React.JSX.Element;
|
|
821
845
|
|
|
822
846
|
export { WIDGET_SUITE_CONTENT_LABELS_EN, WIDGET_SUITE_DEFAULT_SECTIONS, WIDGET_SUITE_DISCLOSURE_LABELS_EN, WIDGET_SUITE_SECTION_LABELS_EN, WIDGET_SUITE_SECTION_TITLE_LABELS_EN, WIDGET_SUITE_SHELL_LABELS_EN, WidgetSuite, WidgetSuiteSectionId };
|
|
823
847
|
export type { AcceptDisclosuresLinks, PartialDeep, WidgetSuiteContentLabels, WidgetSuiteDisclosureLabels, WidgetSuiteProps, WidgetSuiteSectionLabels, WidgetSuiteSectionTitleLabels, WidgetSuiteShellLabels };
|
package/dist/index.css
CHANGED
|
@@ -155,6 +155,10 @@
|
|
|
155
155
|
container-type: inline-size;
|
|
156
156
|
container-name: field-group;
|
|
157
157
|
}
|
|
158
|
+
.ttw\:\@container\/line-item {
|
|
159
|
+
container-type: inline-size;
|
|
160
|
+
container-name: line-item;
|
|
161
|
+
}
|
|
158
162
|
.ttw\:\@container\/widget {
|
|
159
163
|
container-type: inline-size;
|
|
160
164
|
container-name: widget;
|
|
@@ -353,6 +357,12 @@
|
|
|
353
357
|
.ttw\:order-last {
|
|
354
358
|
order: 9999;
|
|
355
359
|
}
|
|
360
|
+
.ttw\:col-span-1 {
|
|
361
|
+
grid-column: span 1 / span 1;
|
|
362
|
+
}
|
|
363
|
+
.ttw\:col-span-3 {
|
|
364
|
+
grid-column: span 3 / span 3;
|
|
365
|
+
}
|
|
356
366
|
.ttw\:col-start-2 {
|
|
357
367
|
grid-column-start: 2;
|
|
358
368
|
}
|
|
@@ -1624,9 +1634,6 @@
|
|
|
1624
1634
|
.ttw\:grid-cols-3 {
|
|
1625
1635
|
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
1626
1636
|
}
|
|
1627
|
-
.ttw\:grid-cols-4 {
|
|
1628
|
-
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
1629
|
-
}
|
|
1630
1637
|
.ttw\:grid-cols-\[0_1fr\] {
|
|
1631
1638
|
grid-template-columns: 0 1fr;
|
|
1632
1639
|
}
|
|
@@ -1958,6 +1965,10 @@
|
|
|
1958
1965
|
border-top-left-radius: calc(var(--ttw-radius) - 2px);
|
|
1959
1966
|
border-bottom-left-radius: calc(var(--ttw-radius) - 2px);
|
|
1960
1967
|
}
|
|
1968
|
+
.ttw\:rounded-l-none {
|
|
1969
|
+
border-top-left-radius: 0;
|
|
1970
|
+
border-bottom-left-radius: 0;
|
|
1971
|
+
}
|
|
1961
1972
|
.ttw\:rounded-tl-\[14px\] {
|
|
1962
1973
|
border-top-left-radius: 14px;
|
|
1963
1974
|
}
|
|
@@ -1968,6 +1979,10 @@
|
|
|
1968
1979
|
border-top-right-radius: calc(var(--ttw-radius) - 2px);
|
|
1969
1980
|
border-bottom-right-radius: calc(var(--ttw-radius) - 2px);
|
|
1970
1981
|
}
|
|
1982
|
+
.ttw\:rounded-r-none {
|
|
1983
|
+
border-top-right-radius: 0;
|
|
1984
|
+
border-bottom-right-radius: 0;
|
|
1985
|
+
}
|
|
1971
1986
|
.ttw\:rounded-tr-\[14px\] {
|
|
1972
1987
|
border-top-right-radius: 14px;
|
|
1973
1988
|
}
|
|
@@ -2817,9 +2832,6 @@
|
|
|
2817
2832
|
.ttw\:pt-6 {
|
|
2818
2833
|
padding-top: calc(var(--ttw-spacing) * 6);
|
|
2819
2834
|
}
|
|
2820
|
-
.ttw\:pt-7 {
|
|
2821
|
-
padding-top: calc(var(--ttw-spacing) * 7);
|
|
2822
|
-
}
|
|
2823
2835
|
.ttw\:pt-8 {
|
|
2824
2836
|
padding-top: calc(var(--ttw-spacing) * 8);
|
|
2825
2837
|
}
|
|
@@ -2949,9 +2961,6 @@
|
|
|
2949
2961
|
.ttw\:text-right {
|
|
2950
2962
|
text-align: right;
|
|
2951
2963
|
}
|
|
2952
|
-
.ttw\:align-baseline {
|
|
2953
|
-
vertical-align: baseline;
|
|
2954
|
-
}
|
|
2955
2964
|
.ttw\:align-middle {
|
|
2956
2965
|
vertical-align: middle;
|
|
2957
2966
|
}
|
|
@@ -4572,6 +4581,28 @@
|
|
|
4572
4581
|
.ttw\:has-\[\:disabled\]\:opacity-60:has(:is(:disabled)) {
|
|
4573
4582
|
opacity: 60%;
|
|
4574
4583
|
}
|
|
4584
|
+
.ttw\:has-\[\:focus-visible\]\:border-ring:has(:is(:focus-visible)) {
|
|
4585
|
+
border-color: var(--ttw-ring);
|
|
4586
|
+
}
|
|
4587
|
+
.ttw\:has-\[\:focus-visible\]\:ring-\[3px\]:has(:is(:focus-visible)) {
|
|
4588
|
+
--tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
|
|
4589
|
+
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
4590
|
+
}
|
|
4591
|
+
.ttw\:has-\[\:focus-visible\]\:ring-ring\/50:has(:is(:focus-visible)) {
|
|
4592
|
+
--tw-ring-color: var(--ttw-ring);
|
|
4593
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
4594
|
+
--tw-ring-color: color-mix(in oklab, var(--ttw-ring) 50%, transparent);
|
|
4595
|
+
}
|
|
4596
|
+
}
|
|
4597
|
+
.ttw\:has-\[\[aria-invalid\=true\]\]\:border-destructive:has(:is([aria-invalid=true])) {
|
|
4598
|
+
border-color: var(--ttw-destructive);
|
|
4599
|
+
}
|
|
4600
|
+
.ttw\:has-\[\[aria-invalid\=true\]\]\:ring-destructive\/20:has(:is([aria-invalid=true])) {
|
|
4601
|
+
--tw-ring-color: var(--ttw-destructive);
|
|
4602
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
4603
|
+
--tw-ring-color: color-mix(in oklab, var(--ttw-destructive) 20%, transparent);
|
|
4604
|
+
}
|
|
4605
|
+
}
|
|
4575
4606
|
.ttw\:has-\[\[data-slot\=input-group-control\]\:focus-visible\]\:border-ring:has(:is([data-slot=input-group-control]:focus-visible)) {
|
|
4576
4607
|
border-color: var(--ttw-ring);
|
|
4577
4608
|
}
|
|
@@ -5453,6 +5484,11 @@
|
|
|
5453
5484
|
align-items: flex-start;
|
|
5454
5485
|
}
|
|
5455
5486
|
}
|
|
5487
|
+
@container line-item (width >= 32rem) {
|
|
5488
|
+
.ttw\:\@lg\/line-item\:grid-cols-6 {
|
|
5489
|
+
grid-template-columns: repeat(6, minmax(0, 1fr));
|
|
5490
|
+
}
|
|
5491
|
+
}
|
|
5456
5492
|
.ttw\:dark\:border-input:is(.dark *) {
|
|
5457
5493
|
border-color: var(--ttw-input);
|
|
5458
5494
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -622,6 +622,30 @@ interface WidgetConfigInput {
|
|
|
622
622
|
* ```
|
|
623
623
|
*/
|
|
624
624
|
configClient?: (client: EmbeddedClient) => EmbeddedClient;
|
|
625
|
+
/**
|
|
626
|
+
* Overrides the widget-gateway routing decision for the scoped HTTP client.
|
|
627
|
+
*
|
|
628
|
+
* Any caller reaching the Tesouro API with a widget token must route data
|
|
629
|
+
* requests through the widget gateway: prefix the path with
|
|
630
|
+
* `/api/widget-gateway/proxy` and carry the token as `X-Widget-Token`. The
|
|
631
|
+
* provider applies both automatically per request when the request origin is
|
|
632
|
+
* a known Tesouro API host (`WIDGET_GATEWAY_HOSTS`, derived from the
|
|
633
|
+
* generated `ClientOptions['baseUrl']`); `/api/widget-gateway/*` paths (the
|
|
634
|
+
* init round-trip) always pass through untouched.
|
|
635
|
+
*
|
|
636
|
+
* - `undefined` — decide from the request origin, as above. Inherits from
|
|
637
|
+
* the nearest ancestor or global store like every other config field.
|
|
638
|
+
* - `true` — always apply the rewrite, even for an unlisted base URL (e.g. a
|
|
639
|
+
* custom domain in front of the gateway).
|
|
640
|
+
* - `false` — never apply it. For hosts that route widget requests their own
|
|
641
|
+
* way, such as a same-origin BFF whose `configClient` retargets every
|
|
642
|
+
* request.
|
|
643
|
+
*
|
|
644
|
+
* Independent of {@link configClient}: a host that only adds a header keeps
|
|
645
|
+
* the built-in routing, and the built-in interceptor runs before any
|
|
646
|
+
* `configClient` interceptor.
|
|
647
|
+
*/
|
|
648
|
+
gatewayRouting?: boolean;
|
|
625
649
|
/**
|
|
626
650
|
* Component the embedded widgets should render in place of plain `<a>` tags.
|
|
627
651
|
*
|
|
@@ -975,7 +999,7 @@ interface RootWidgetProviderProps extends WidgetProviderBaseProps {
|
|
|
975
999
|
* @see {@link useWidgetConfig} to read the resolved config in descendants
|
|
976
1000
|
* @see {@link setGlobalWidgetConfig} to push config imperatively from outside React
|
|
977
1001
|
*/
|
|
978
|
-
declare function RootWidgetProvider({ children, baseUrl, widgetToken, organizationId, configClient, linkComponent, uiFramework, implementation, analytics, unstable_initResponseOverride, }: PropsWithChildren<RootWidgetProviderProps>): React.JSX.Element;
|
|
1002
|
+
declare function RootWidgetProvider({ children, baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, uiFramework, implementation, analytics, unstable_initResponseOverride, }: PropsWithChildren<RootWidgetProviderProps>): React.JSX.Element;
|
|
979
1003
|
|
|
980
1004
|
/**
|
|
981
1005
|
* Props for {@link WidgetProvider}.
|
|
@@ -1407,7 +1431,7 @@ type AcceptDisclosuresWidgetProps = WidgetProviderProps & InnerProps;
|
|
|
1407
1431
|
* neither, and the same init refresh clears the gate that mounted this. See
|
|
1408
1432
|
* `WidgetSuite`, which mounts it as its acceptance state.
|
|
1409
1433
|
*/
|
|
1410
|
-
declare function AcceptDisclosuresWidget({ baseUrl, widgetToken, organizationId, configClient, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, ...innerProps }: AcceptDisclosuresWidgetProps): React.JSX.Element;
|
|
1434
|
+
declare function AcceptDisclosuresWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, ...innerProps }: AcceptDisclosuresWidgetProps): React.JSX.Element;
|
|
1411
1435
|
|
|
1412
1436
|
interface Labels$6 {
|
|
1413
1437
|
title: string;
|
|
@@ -1544,7 +1568,7 @@ interface BankAccountsWidgetProps extends WidgetProviderProps {
|
|
|
1544
1568
|
/** Called when the user opens account details or goes back to the list. */
|
|
1545
1569
|
onSelectedAccountIdChange?: (accountId: string | null) => void;
|
|
1546
1570
|
}
|
|
1547
|
-
declare function BankAccountsWidget({ baseUrl, widgetToken, organizationId, configClient, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, ...innerProps }: BankAccountsWidgetProps): React.JSX.Element;
|
|
1571
|
+
declare function BankAccountsWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, ...innerProps }: BankAccountsWidgetProps): React.JSX.Element;
|
|
1548
1572
|
|
|
1549
1573
|
/**
|
|
1550
1574
|
* Action handlers for custom payment flows in payable operations.
|
|
@@ -1954,7 +1978,7 @@ interface CardDetailsWidgetProps extends WidgetProviderProps {
|
|
|
1954
1978
|
* Both placements are covered by specs, because they take different code paths
|
|
1955
1979
|
* through the provider and this export exists for the standalone one.
|
|
1956
1980
|
*/
|
|
1957
|
-
declare function CardDetailsWidget({ baseUrl, widgetToken, organizationId, configClient, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, ...innerProps }: CardDetailsWidgetProps): React.JSX.Element;
|
|
1981
|
+
declare function CardDetailsWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, ...innerProps }: CardDetailsWidgetProps): React.JSX.Element;
|
|
1958
1982
|
|
|
1959
1983
|
type PartialDeep$2<T> = {
|
|
1960
1984
|
[K in keyof T]?: T[K] extends object ? PartialDeep$2<T[K]> : T[K];
|
|
@@ -2063,7 +2087,7 @@ type CreateCardWidgetProps = WidgetProviderProps & {
|
|
|
2063
2087
|
* Self-contained Create Card widget. Issues a debit card via the Embed API and
|
|
2064
2088
|
* drives setup → preparing → success with sonner toasts for the mutation.
|
|
2065
2089
|
*/
|
|
2066
|
-
declare function CreateCardWidget({ baseUrl, widgetToken, organizationId, configClient, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, ...innerProps }: CreateCardWidgetProps): React.JSX.Element;
|
|
2090
|
+
declare function CreateCardWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, ...innerProps }: CreateCardWidgetProps): React.JSX.Element;
|
|
2067
2091
|
|
|
2068
2092
|
/** Opaque UI format values — mapped to API `DebitCardType` in the feature. */
|
|
2069
2093
|
declare const CardFormatValue: {
|
|
@@ -2283,7 +2307,7 @@ interface CardsWidgetProps extends WidgetProviderProps {
|
|
|
2283
2307
|
* inside `WidgetProvider`'s subtree, which is what the data-access hooks read
|
|
2284
2308
|
* their client, org and token from.
|
|
2285
2309
|
*/
|
|
2286
|
-
declare function CardsWidget({ baseUrl, widgetToken, organizationId, configClient, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, ...innerProps }: CardsWidgetProps): React.JSX.Element;
|
|
2310
|
+
declare function CardsWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, ...innerProps }: CardsWidgetProps): React.JSX.Element;
|
|
2287
2311
|
|
|
2288
2312
|
interface AddressFieldGroupLabels {
|
|
2289
2313
|
line1: string;
|
|
@@ -2554,7 +2578,7 @@ type CounterpartsWidgetProps = WidgetProviderProps & CounterpartsWidgetOwnProps;
|
|
|
2554
2578
|
* />
|
|
2555
2579
|
* ```
|
|
2556
2580
|
*/
|
|
2557
|
-
declare function CounterpartsWidget({ baseUrl, widgetToken, organizationId, configClient, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, ...innerProps }: CounterpartsWidgetProps): React.JSX.Element;
|
|
2581
|
+
declare function CounterpartsWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, ...innerProps }: CounterpartsWidgetProps): React.JSX.Element;
|
|
2558
2582
|
|
|
2559
2583
|
interface Labels$4 {
|
|
2560
2584
|
title: string;
|
|
@@ -2598,7 +2622,7 @@ interface ExpenseManagementWidgetProps extends WidgetProviderProps {
|
|
|
2598
2622
|
policiesContent?: ReactNode;
|
|
2599
2623
|
requirementsContent?: ReactNode;
|
|
2600
2624
|
}
|
|
2601
|
-
declare function ExpenseManagementWidget({ baseUrl, widgetToken, organizationId, configClient, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, ...innerProps }: ExpenseManagementWidgetProps): React.JSX.Element;
|
|
2625
|
+
declare function ExpenseManagementWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, ...innerProps }: ExpenseManagementWidgetProps): React.JSX.Element;
|
|
2602
2626
|
|
|
2603
2627
|
type ExpenseApprovalPoliciesWidgetProps = WidgetProviderProps & {
|
|
2604
2628
|
/** @deprecated Use `widgetToken` instead */
|
|
@@ -2606,7 +2630,7 @@ type ExpenseApprovalPoliciesWidgetProps = WidgetProviderProps & {
|
|
|
2606
2630
|
/** @deprecated Use `organizationId` instead */
|
|
2607
2631
|
orgId?: string | null;
|
|
2608
2632
|
};
|
|
2609
|
-
declare function ExpenseApprovalPoliciesWidget({ token, orgId, widgetToken, organizationId, baseUrl, configClient, linkComponent, implementation, uiFramework, errorFallback, onError, }?: ExpenseApprovalPoliciesWidgetProps): React.JSX.Element;
|
|
2633
|
+
declare function ExpenseApprovalPoliciesWidget({ token, orgId, widgetToken, organizationId, baseUrl, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, }?: ExpenseApprovalPoliciesWidgetProps): React.JSX.Element;
|
|
2610
2634
|
|
|
2611
2635
|
type ExpenseRequirementsWidgetProps = WidgetProviderProps & {
|
|
2612
2636
|
/** @deprecated Use `widgetToken` instead */
|
|
@@ -2614,7 +2638,7 @@ type ExpenseRequirementsWidgetProps = WidgetProviderProps & {
|
|
|
2614
2638
|
/** @deprecated Use `organizationId` instead */
|
|
2615
2639
|
orgId?: string | null;
|
|
2616
2640
|
};
|
|
2617
|
-
declare function ExpenseRequirementsWidget({ token, orgId, widgetToken, organizationId, baseUrl, configClient, linkComponent, implementation, uiFramework, errorFallback, onError, }?: ExpenseRequirementsWidgetProps): React.JSX.Element;
|
|
2641
|
+
declare function ExpenseRequirementsWidget({ token, orgId, widgetToken, organizationId, baseUrl, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, }?: ExpenseRequirementsWidgetProps): React.JSX.Element;
|
|
2618
2642
|
|
|
2619
2643
|
interface BalancesWidgetLabels {
|
|
2620
2644
|
/** Card header title (e.g. next to the building icon) */
|
|
@@ -3069,7 +3093,7 @@ type ChartOfAccountsWidgetProps = WidgetProviderProps & TableProps & ChartOfAcco
|
|
|
3069
3093
|
* />
|
|
3070
3094
|
* ```
|
|
3071
3095
|
*/
|
|
3072
|
-
declare function ChartOfAccountsWidget({ baseUrl, widgetToken, organizationId, configClient, linkComponent, implementation, uiFramework, analytics, errorFallback, onError, ...tableProps }: ChartOfAccountsWidgetProps): React.JSX.Element;
|
|
3096
|
+
declare function ChartOfAccountsWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, analytics, errorFallback, onError, ...tableProps }: ChartOfAccountsWidgetProps): React.JSX.Element;
|
|
3073
3097
|
|
|
3074
3098
|
/**
|
|
3075
3099
|
* Static FAQ content for the Help widget.
|
|
@@ -3177,12 +3201,12 @@ type HelpWidgetProps = WidgetProviderProps & HelpContentProps;
|
|
|
3177
3201
|
* <HelpWidget bankName="Acme Bank" contactUrl="https://acme.example/support" />
|
|
3178
3202
|
* ```
|
|
3179
3203
|
*/
|
|
3180
|
-
declare function HelpWidget({ baseUrl, widgetToken, organizationId, configClient, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, ...contentProps }: HelpWidgetProps): React.JSX.Element;
|
|
3204
|
+
declare function HelpWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, ...contentProps }: HelpWidgetProps): React.JSX.Element;
|
|
3181
3205
|
|
|
3182
3206
|
type ReceivablesWidgetMoniteProps = MoniteRegionProviderProps & Omit<ReceivablesProps, 'pageTitleComponent' | 'initialView' | 'initialCounterpartId'> & {
|
|
3183
3207
|
pageTitleComponent?: ReceivablesProps['pageTitleComponent'];
|
|
3184
3208
|
};
|
|
3185
|
-
declare function ReceivablesWidgetMonite({ baseUrl, widgetToken, organizationId, configClient, linkComponent, errorFallback, onError, finopsThemeColors, analytics, pageTitleComponent, uiFramework, ...receivablesProps }: ReceivablesWidgetMoniteProps): React.JSX.Element;
|
|
3209
|
+
declare function ReceivablesWidgetMonite({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, errorFallback, onError, finopsThemeColors, analytics, pageTitleComponent, uiFramework, ...receivablesProps }: ReceivablesWidgetMoniteProps): React.JSX.Element;
|
|
3186
3210
|
|
|
3187
3211
|
interface ProductFormSheetLabels {
|
|
3188
3212
|
createTitle: string;
|
|
@@ -3507,7 +3531,7 @@ interface ReceivablesWidgetOwnProps {
|
|
|
3507
3531
|
}
|
|
3508
3532
|
type ReceivablesWidgetProps = WidgetProviderProps & ReceivablesWidgetOwnProps;
|
|
3509
3533
|
|
|
3510
|
-
declare function ReceivablesWidget({ baseUrl, widgetToken, organizationId, configClient, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, ...innerProps }: ReceivablesWidgetProps): React.JSX.Element;
|
|
3534
|
+
declare function ReceivablesWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, ...innerProps }: ReceivablesWidgetProps): React.JSX.Element;
|
|
3511
3535
|
|
|
3512
3536
|
interface Labels$3 {
|
|
3513
3537
|
title: string;
|
|
@@ -3589,7 +3613,7 @@ interface LinkedAccountsWidgetProps extends WidgetProviderProps {
|
|
|
3589
3613
|
labels?: Partial<Labels$3>;
|
|
3590
3614
|
featureLabels?: Partial<FeatureLabels$4>;
|
|
3591
3615
|
}
|
|
3592
|
-
declare function LinkedAccountsWidget({ baseUrl, widgetToken, organizationId, configClient, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, ...innerProps }: LinkedAccountsWidgetProps): React.JSX.Element;
|
|
3616
|
+
declare function LinkedAccountsWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, ...innerProps }: LinkedAccountsWidgetProps): React.JSX.Element;
|
|
3593
3617
|
|
|
3594
3618
|
interface AdditionalOwnersLabels {
|
|
3595
3619
|
heading: string;
|
|
@@ -3893,7 +3917,7 @@ interface BankAccountOnboardingWidgetInnerProps {
|
|
|
3893
3917
|
onOpenChange?: (open: boolean) => void;
|
|
3894
3918
|
}
|
|
3895
3919
|
type BankAccountOnboardingWidgetProps = WidgetProviderProps & BankAccountOnboardingWidgetInnerProps;
|
|
3896
|
-
declare function BankAccountOnboardingWidget({ baseUrl, widgetToken, organizationId, configClient, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, ...innerProps }: BankAccountOnboardingWidgetProps): React.JSX.Element;
|
|
3920
|
+
declare function BankAccountOnboardingWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, ...innerProps }: BankAccountOnboardingWidgetProps): React.JSX.Element;
|
|
3897
3921
|
|
|
3898
3922
|
/**
|
|
3899
3923
|
* Co-located user-facing strings for the products widget UI. Each component
|
|
@@ -3991,7 +4015,7 @@ type ProductsWidgetProps = WidgetProviderProps & ProductsWidgetOwnProps;
|
|
|
3991
4015
|
* <ProductsWidget baseUrl="https://api.tesouro.com" widgetToken="wt_..." organizationId="org_..." />
|
|
3992
4016
|
* ```
|
|
3993
4017
|
*/
|
|
3994
|
-
declare function ProductsWidget({ baseUrl, widgetToken, organizationId, configClient, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, ...innerProps }: ProductsWidgetProps): React.JSX.Element;
|
|
4018
|
+
declare function ProductsWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, ...innerProps }: ProductsWidgetProps): React.JSX.Element;
|
|
3995
4019
|
|
|
3996
4020
|
interface Labels$2 {
|
|
3997
4021
|
loadingLabel: string;
|
|
@@ -4032,7 +4056,7 @@ interface ProfileWidgetProps extends WidgetProviderProps {
|
|
|
4032
4056
|
*/
|
|
4033
4057
|
contactUrl?: string;
|
|
4034
4058
|
}
|
|
4035
|
-
declare function ProfileWidget({ baseUrl, widgetToken, organizationId, configClient, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, ...innerProps }: ProfileWidgetProps): React.JSX.Element;
|
|
4059
|
+
declare function ProfileWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, ...innerProps }: ProfileWidgetProps): React.JSX.Element;
|
|
4036
4060
|
|
|
4037
4061
|
type ReceiptMatchWidgetProps = WidgetProviderProps & {
|
|
4038
4062
|
isOpen?: boolean;
|
|
@@ -4041,7 +4065,7 @@ type ReceiptMatchWidgetProps = WidgetProviderProps & {
|
|
|
4041
4065
|
targetTransactionId?: string;
|
|
4042
4066
|
onSingleTransactionUpdate?: () => void;
|
|
4043
4067
|
};
|
|
4044
|
-
declare function ReceiptMatchWidget({ baseUrl, widgetToken, organizationId, configClient, linkComponent, implementation, uiFramework, errorFallback, onError, isOpen, preSelectedReceiptIds, onClose, targetTransactionId, onSingleTransactionUpdate, }: ReceiptMatchWidgetProps): React.JSX.Element;
|
|
4068
|
+
declare function ReceiptMatchWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, isOpen, preSelectedReceiptIds, onClose, targetTransactionId, onSingleTransactionUpdate, }: ReceiptMatchWidgetProps): React.JSX.Element;
|
|
4045
4069
|
|
|
4046
4070
|
interface Labels$1 {
|
|
4047
4071
|
title: string;
|
|
@@ -4147,7 +4171,7 @@ interface SettingsWidgetProps extends MoniteRegionProviderProps {
|
|
|
4147
4171
|
tagsContent?: ReactNode;
|
|
4148
4172
|
invoiceContent?: ReactNode;
|
|
4149
4173
|
}
|
|
4150
|
-
declare function SettingsWidget({ baseUrl, widgetToken, organizationId, configClient, linkComponent, implementation, uiFramework, errorFallback, onError, finopsThemeColors, analytics, ...innerProps }: SettingsWidgetProps): React.JSX.Element;
|
|
4174
|
+
declare function SettingsWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, finopsThemeColors, analytics, ...innerProps }: SettingsWidgetProps): React.JSX.Element;
|
|
4151
4175
|
|
|
4152
4176
|
/**
|
|
4153
4177
|
* Co-located user-facing strings for the tags widget UI. Each component takes a
|
|
@@ -4236,7 +4260,7 @@ type TagsWidgetProps = WidgetProviderProps & TagsWidgetOwnProps;
|
|
|
4236
4260
|
* <TagsWidget baseUrl="https://api.tesouro.com" widgetToken="wt_..." organizationId="org_..." />
|
|
4237
4261
|
* ```
|
|
4238
4262
|
*/
|
|
4239
|
-
declare function TagsWidget({ baseUrl, widgetToken, organizationId, configClient, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, ...innerProps }: TagsWidgetProps): React.JSX.Element;
|
|
4263
|
+
declare function TagsWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, ...innerProps }: TagsWidgetProps): React.JSX.Element;
|
|
4240
4264
|
|
|
4241
4265
|
interface Labels {
|
|
4242
4266
|
title: string;
|
|
@@ -4486,7 +4510,7 @@ interface TeamWidgetProps extends WidgetProviderProps {
|
|
|
4486
4510
|
*/
|
|
4487
4511
|
acceptInviteRedirectUri?: string;
|
|
4488
4512
|
}
|
|
4489
|
-
declare function TeamWidget({ baseUrl, widgetToken, organizationId, configClient, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, ...innerProps }: TeamWidgetProps): React.JSX.Element;
|
|
4513
|
+
declare function TeamWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, ...innerProps }: TeamWidgetProps): React.JSX.Element;
|
|
4490
4514
|
|
|
4491
4515
|
interface TransfersWidgetLabels {
|
|
4492
4516
|
widgetTitle: string;
|
package/dist/index.js
CHANGED
|
@@ -15,7 +15,7 @@ import "./lib/AcceptDisclosuresWidget.js";
|
|
|
15
15
|
import { BankAccountsWidget as x } from "./libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/index8.js";
|
|
16
16
|
import "./lib/BankAccountsWidget.js";
|
|
17
17
|
import { CounterpartsWidget as S } from "./libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/index8.js";
|
|
18
|
-
import { BillPayWidget as C } from "./libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/
|
|
18
|
+
import { BillPayWidget as C } from "./libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index30.js";
|
|
19
19
|
import "./lib/BillPayWidget.js";
|
|
20
20
|
import { CardDetailsWidget as w } from "./libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index6.js";
|
|
21
21
|
import { CardFormatValue as T } from "./libs/tesouro-embedded-components-react/create-card-widget/feature/dist/index3.js";
|
|
@@ -529,6 +529,30 @@ interface WidgetConfigInput {
|
|
|
529
529
|
* ```
|
|
530
530
|
*/
|
|
531
531
|
configClient?: (client: EmbeddedClient) => EmbeddedClient;
|
|
532
|
+
/**
|
|
533
|
+
* Overrides the widget-gateway routing decision for the scoped HTTP client.
|
|
534
|
+
*
|
|
535
|
+
* Any caller reaching the Tesouro API with a widget token must route data
|
|
536
|
+
* requests through the widget gateway: prefix the path with
|
|
537
|
+
* `/api/widget-gateway/proxy` and carry the token as `X-Widget-Token`. The
|
|
538
|
+
* provider applies both automatically per request when the request origin is
|
|
539
|
+
* a known Tesouro API host (`WIDGET_GATEWAY_HOSTS`, derived from the
|
|
540
|
+
* generated `ClientOptions['baseUrl']`); `/api/widget-gateway/*` paths (the
|
|
541
|
+
* init round-trip) always pass through untouched.
|
|
542
|
+
*
|
|
543
|
+
* - `undefined` — decide from the request origin, as above. Inherits from
|
|
544
|
+
* the nearest ancestor or global store like every other config field.
|
|
545
|
+
* - `true` — always apply the rewrite, even for an unlisted base URL (e.g. a
|
|
546
|
+
* custom domain in front of the gateway).
|
|
547
|
+
* - `false` — never apply it. For hosts that route widget requests their own
|
|
548
|
+
* way, such as a same-origin BFF whose `configClient` retargets every
|
|
549
|
+
* request.
|
|
550
|
+
*
|
|
551
|
+
* Independent of {@link configClient}: a host that only adds a header keeps
|
|
552
|
+
* the built-in routing, and the built-in interceptor runs before any
|
|
553
|
+
* `configClient` interceptor.
|
|
554
|
+
*/
|
|
555
|
+
gatewayRouting?: boolean;
|
|
532
556
|
/**
|
|
533
557
|
* Component the embedded widgets should render in place of plain `<a>` tags.
|
|
534
558
|
*
|
|
@@ -685,7 +709,7 @@ type AcceptDisclosuresWidgetProps = WidgetProviderProps & InnerProps;
|
|
|
685
709
|
* neither, and the same init refresh clears the gate that mounted this. See
|
|
686
710
|
* `WidgetSuite`, which mounts it as its acceptance state.
|
|
687
711
|
*/
|
|
688
|
-
declare function AcceptDisclosuresWidget({ baseUrl, widgetToken, organizationId, configClient, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, ...innerProps }: AcceptDisclosuresWidgetProps): React.JSX.Element;
|
|
712
|
+
declare function AcceptDisclosuresWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, ...innerProps }: AcceptDisclosuresWidgetProps): React.JSX.Element;
|
|
689
713
|
|
|
690
714
|
export { ACCEPT_DISCLOSURES_WIDGET_LABELS_EN, AcceptDisclosuresWidget };
|
|
691
715
|
export type { AcceptDisclosuresLinks, AcceptDisclosuresWidgetLabels, AcceptDisclosuresWidgetProps };
|
|
@@ -498,6 +498,30 @@ interface WidgetConfigInput {
|
|
|
498
498
|
* ```
|
|
499
499
|
*/
|
|
500
500
|
configClient?: (client: EmbeddedClient) => EmbeddedClient;
|
|
501
|
+
/**
|
|
502
|
+
* Overrides the widget-gateway routing decision for the scoped HTTP client.
|
|
503
|
+
*
|
|
504
|
+
* Any caller reaching the Tesouro API with a widget token must route data
|
|
505
|
+
* requests through the widget gateway: prefix the path with
|
|
506
|
+
* `/api/widget-gateway/proxy` and carry the token as `X-Widget-Token`. The
|
|
507
|
+
* provider applies both automatically per request when the request origin is
|
|
508
|
+
* a known Tesouro API host (`WIDGET_GATEWAY_HOSTS`, derived from the
|
|
509
|
+
* generated `ClientOptions['baseUrl']`); `/api/widget-gateway/*` paths (the
|
|
510
|
+
* init round-trip) always pass through untouched.
|
|
511
|
+
*
|
|
512
|
+
* - `undefined` — decide from the request origin, as above. Inherits from
|
|
513
|
+
* the nearest ancestor or global store like every other config field.
|
|
514
|
+
* - `true` — always apply the rewrite, even for an unlisted base URL (e.g. a
|
|
515
|
+
* custom domain in front of the gateway).
|
|
516
|
+
* - `false` — never apply it. For hosts that route widget requests their own
|
|
517
|
+
* way, such as a same-origin BFF whose `configClient` retargets every
|
|
518
|
+
* request.
|
|
519
|
+
*
|
|
520
|
+
* Independent of {@link configClient}: a host that only adds a header keeps
|
|
521
|
+
* the built-in routing, and the built-in interceptor runs before any
|
|
522
|
+
* `configClient` interceptor.
|
|
523
|
+
*/
|
|
524
|
+
gatewayRouting?: boolean;
|
|
501
525
|
/**
|
|
502
526
|
* Component the embedded widgets should render in place of plain `<a>` tags.
|
|
503
527
|
*
|
|
@@ -744,6 +744,30 @@ interface WidgetConfigInput {
|
|
|
744
744
|
* ```
|
|
745
745
|
*/
|
|
746
746
|
configClient?: (client: EmbeddedClient) => EmbeddedClient;
|
|
747
|
+
/**
|
|
748
|
+
* Overrides the widget-gateway routing decision for the scoped HTTP client.
|
|
749
|
+
*
|
|
750
|
+
* Any caller reaching the Tesouro API with a widget token must route data
|
|
751
|
+
* requests through the widget gateway: prefix the path with
|
|
752
|
+
* `/api/widget-gateway/proxy` and carry the token as `X-Widget-Token`. The
|
|
753
|
+
* provider applies both automatically per request when the request origin is
|
|
754
|
+
* a known Tesouro API host (`WIDGET_GATEWAY_HOSTS`, derived from the
|
|
755
|
+
* generated `ClientOptions['baseUrl']`); `/api/widget-gateway/*` paths (the
|
|
756
|
+
* init round-trip) always pass through untouched.
|
|
757
|
+
*
|
|
758
|
+
* - `undefined` — decide from the request origin, as above. Inherits from
|
|
759
|
+
* the nearest ancestor or global store like every other config field.
|
|
760
|
+
* - `true` — always apply the rewrite, even for an unlisted base URL (e.g. a
|
|
761
|
+
* custom domain in front of the gateway).
|
|
762
|
+
* - `false` — never apply it. For hosts that route widget requests their own
|
|
763
|
+
* way, such as a same-origin BFF whose `configClient` retargets every
|
|
764
|
+
* request.
|
|
765
|
+
*
|
|
766
|
+
* Independent of {@link configClient}: a host that only adds a header keeps
|
|
767
|
+
* the built-in routing, and the built-in interceptor runs before any
|
|
768
|
+
* `configClient` interceptor.
|
|
769
|
+
*/
|
|
770
|
+
gatewayRouting?: boolean;
|
|
747
771
|
/**
|
|
748
772
|
* Component the embedded widgets should render in place of plain `<a>` tags.
|
|
749
773
|
*
|
|
@@ -923,7 +947,7 @@ interface BankAccountOnboardingWidgetInnerProps {
|
|
|
923
947
|
onOpenChange?: (open: boolean) => void;
|
|
924
948
|
}
|
|
925
949
|
type BankAccountOnboardingWidgetProps = WidgetProviderProps & BankAccountOnboardingWidgetInnerProps;
|
|
926
|
-
declare function BankAccountOnboardingWidget({ baseUrl, widgetToken, organizationId, configClient, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, ...innerProps }: BankAccountOnboardingWidgetProps): React.JSX.Element;
|
|
950
|
+
declare function BankAccountOnboardingWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, ...innerProps }: BankAccountOnboardingWidgetProps): React.JSX.Element;
|
|
927
951
|
|
|
928
952
|
export { ADDITIONAL_OWNERS_LABELS_EN, BUSINESS_DETAILS_LABELS_EN, BankAccountOnboardingWidget, PERSONAL_DETAILS_LABELS_EN, RESULT_LABELS_EN };
|
|
929
953
|
export type { AdditionalOwner, AdditionalOwnersLabels, BankAccountOnboardingWidgetLabels, BankAccountOnboardingWidgetProps, BusinessDetailsLabels, BusinessDetailsValues, CompanyStructureValue, DisclosureLinks, MarketingWidgetContent, PersonalDetailsLabels, PersonalDetailsValues, ResultLabels };
|