@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
|
@@ -477,6 +477,30 @@ interface WidgetConfigInput {
|
|
|
477
477
|
* ```
|
|
478
478
|
*/
|
|
479
479
|
configClient?: (client: EmbeddedClient) => EmbeddedClient;
|
|
480
|
+
/**
|
|
481
|
+
* Overrides the widget-gateway routing decision for the scoped HTTP client.
|
|
482
|
+
*
|
|
483
|
+
* Any caller reaching the Tesouro API with a widget token must route data
|
|
484
|
+
* requests through the widget gateway: prefix the path with
|
|
485
|
+
* `/api/widget-gateway/proxy` and carry the token as `X-Widget-Token`. The
|
|
486
|
+
* provider applies both automatically per request when the request origin is
|
|
487
|
+
* a known Tesouro API host (`WIDGET_GATEWAY_HOSTS`, derived from the
|
|
488
|
+
* generated `ClientOptions['baseUrl']`); `/api/widget-gateway/*` paths (the
|
|
489
|
+
* init round-trip) always pass through untouched.
|
|
490
|
+
*
|
|
491
|
+
* - `undefined` — decide from the request origin, as above. Inherits from
|
|
492
|
+
* the nearest ancestor or global store like every other config field.
|
|
493
|
+
* - `true` — always apply the rewrite, even for an unlisted base URL (e.g. a
|
|
494
|
+
* custom domain in front of the gateway).
|
|
495
|
+
* - `false` — never apply it. For hosts that route widget requests their own
|
|
496
|
+
* way, such as a same-origin BFF whose `configClient` retargets every
|
|
497
|
+
* request.
|
|
498
|
+
*
|
|
499
|
+
* Independent of {@link configClient}: a host that only adds a header keeps
|
|
500
|
+
* the built-in routing, and the built-in interceptor runs before any
|
|
501
|
+
* `configClient` interceptor.
|
|
502
|
+
*/
|
|
503
|
+
gatewayRouting?: boolean;
|
|
480
504
|
/**
|
|
481
505
|
* Component the embedded widgets should render in place of plain `<a>` tags.
|
|
482
506
|
*
|
|
@@ -573,7 +597,7 @@ type ReceiptMatchWidgetProps = WidgetProviderProps & {
|
|
|
573
597
|
targetTransactionId?: string;
|
|
574
598
|
onSingleTransactionUpdate?: () => void;
|
|
575
599
|
};
|
|
576
|
-
declare function ReceiptMatchWidget({ baseUrl, widgetToken, organizationId, configClient, linkComponent, implementation, uiFramework, errorFallback, onError, isOpen, preSelectedReceiptIds, onClose, targetTransactionId, onSingleTransactionUpdate, }: ReceiptMatchWidgetProps): React.JSX.Element;
|
|
600
|
+
declare function ReceiptMatchWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, isOpen, preSelectedReceiptIds, onClose, targetTransactionId, onSingleTransactionUpdate, }: ReceiptMatchWidgetProps): React.JSX.Element;
|
|
577
601
|
|
|
578
602
|
export { ReceiptMatchWidget };
|
|
579
603
|
export type { ReceiptMatchWidgetProps };
|
|
@@ -484,6 +484,30 @@ interface WidgetConfigInput {
|
|
|
484
484
|
* ```
|
|
485
485
|
*/
|
|
486
486
|
configClient?: (client: EmbeddedClient) => EmbeddedClient;
|
|
487
|
+
/**
|
|
488
|
+
* Overrides the widget-gateway routing decision for the scoped HTTP client.
|
|
489
|
+
*
|
|
490
|
+
* Any caller reaching the Tesouro API with a widget token must route data
|
|
491
|
+
* requests through the widget gateway: prefix the path with
|
|
492
|
+
* `/api/widget-gateway/proxy` and carry the token as `X-Widget-Token`. The
|
|
493
|
+
* provider applies both automatically per request when the request origin is
|
|
494
|
+
* a known Tesouro API host (`WIDGET_GATEWAY_HOSTS`, derived from the
|
|
495
|
+
* generated `ClientOptions['baseUrl']`); `/api/widget-gateway/*` paths (the
|
|
496
|
+
* init round-trip) always pass through untouched.
|
|
497
|
+
*
|
|
498
|
+
* - `undefined` — decide from the request origin, as above. Inherits from
|
|
499
|
+
* the nearest ancestor or global store like every other config field.
|
|
500
|
+
* - `true` — always apply the rewrite, even for an unlisted base URL (e.g. a
|
|
501
|
+
* custom domain in front of the gateway).
|
|
502
|
+
* - `false` — never apply it. For hosts that route widget requests their own
|
|
503
|
+
* way, such as a same-origin BFF whose `configClient` retargets every
|
|
504
|
+
* request.
|
|
505
|
+
*
|
|
506
|
+
* Independent of {@link configClient}: a host that only adds a header keeps
|
|
507
|
+
* the built-in routing, and the built-in interceptor runs before any
|
|
508
|
+
* `configClient` interceptor.
|
|
509
|
+
*/
|
|
510
|
+
gatewayRouting?: boolean;
|
|
487
511
|
/**
|
|
488
512
|
* Component the embedded widgets should render in place of plain `<a>` tags.
|
|
489
513
|
*
|
|
@@ -979,7 +1003,7 @@ interface ReceivablesWidgetOwnProps {
|
|
|
979
1003
|
}
|
|
980
1004
|
type ReceivablesWidgetProps = WidgetProviderProps & ReceivablesWidgetOwnProps;
|
|
981
1005
|
|
|
982
|
-
declare function ReceivablesWidget({ baseUrl, widgetToken, organizationId, configClient, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, ...innerProps }: ReceivablesWidgetProps): React.JSX.Element;
|
|
1006
|
+
declare function ReceivablesWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, ...innerProps }: ReceivablesWidgetProps): React.JSX.Element;
|
|
983
1007
|
|
|
984
1008
|
export { ReceivablesWidget };
|
|
985
1009
|
export type { CounterpartFormSheetLabels, CounterpartMessageLabels, MeasureUnitDeleteDialogLabels, MeasureUnitsManagerLabels, ProductFormSheetLabels, ProductMessageLabels, ReceivableActionDialogLabels, ReceivableDetailsSheetLabelOverrides, ReceivableDetailsSheetLabels, ReceivableDocumentType, ReceivableFormSheetLabels, ReceivableMessageLabels, ReceivablePaymentDialogLabels, ReceivableSendDialogLabels, ReceivableStatusBadgeLabels, ReceivablesScreenLabelOverrides, ReceivablesScreenLabels, ReceivablesWidgetProps, ReceivablesWidgetTab };
|
|
@@ -496,6 +496,30 @@ interface WidgetConfigInput {
|
|
|
496
496
|
* ```
|
|
497
497
|
*/
|
|
498
498
|
configClient?: (client: EmbeddedClient) => EmbeddedClient;
|
|
499
|
+
/**
|
|
500
|
+
* Overrides the widget-gateway routing decision for the scoped HTTP client.
|
|
501
|
+
*
|
|
502
|
+
* Any caller reaching the Tesouro API with a widget token must route data
|
|
503
|
+
* requests through the widget gateway: prefix the path with
|
|
504
|
+
* `/api/widget-gateway/proxy` and carry the token as `X-Widget-Token`. The
|
|
505
|
+
* provider applies both automatically per request when the request origin is
|
|
506
|
+
* a known Tesouro API host (`WIDGET_GATEWAY_HOSTS`, derived from the
|
|
507
|
+
* generated `ClientOptions['baseUrl']`); `/api/widget-gateway/*` paths (the
|
|
508
|
+
* init round-trip) always pass through untouched.
|
|
509
|
+
*
|
|
510
|
+
* - `undefined` — decide from the request origin, as above. Inherits from
|
|
511
|
+
* the nearest ancestor or global store like every other config field.
|
|
512
|
+
* - `true` — always apply the rewrite, even for an unlisted base URL (e.g. a
|
|
513
|
+
* custom domain in front of the gateway).
|
|
514
|
+
* - `false` — never apply it. For hosts that route widget requests their own
|
|
515
|
+
* way, such as a same-origin BFF whose `configClient` retargets every
|
|
516
|
+
* request.
|
|
517
|
+
*
|
|
518
|
+
* Independent of {@link configClient}: a host that only adds a header keeps
|
|
519
|
+
* the built-in routing, and the built-in interceptor runs before any
|
|
520
|
+
* `configClient` interceptor.
|
|
521
|
+
*/
|
|
522
|
+
gatewayRouting?: boolean;
|
|
499
523
|
/**
|
|
500
524
|
* Component the embedded widgets should render in place of plain `<a>` tags.
|
|
501
525
|
*
|
|
@@ -680,7 +704,7 @@ interface SettingsWidgetProps extends MoniteRegionProviderProps {
|
|
|
680
704
|
tagsContent?: ReactNode;
|
|
681
705
|
invoiceContent?: ReactNode;
|
|
682
706
|
}
|
|
683
|
-
declare function SettingsWidget({ baseUrl, widgetToken, organizationId, configClient, linkComponent, implementation, uiFramework, errorFallback, onError, finopsThemeColors, analytics, ...innerProps }: SettingsWidgetProps): React.JSX.Element;
|
|
707
|
+
declare function SettingsWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, finopsThemeColors, analytics, ...innerProps }: SettingsWidgetProps): React.JSX.Element;
|
|
684
708
|
|
|
685
709
|
export { SettingsSection, SettingsWidget };
|
|
686
710
|
export type { SettingsWidgetAdditionalSection, FeatureLabels as SettingsWidgetFeatureLabels, Labels as SettingsWidgetLabels, SettingsWidgetProps, SettingsWidgetSection, SettingsWidgetSectionId };
|
package/dist/lib/TagsWidget.d.ts
CHANGED
|
@@ -477,6 +477,30 @@ interface WidgetConfigInput {
|
|
|
477
477
|
* ```
|
|
478
478
|
*/
|
|
479
479
|
configClient?: (client: EmbeddedClient) => EmbeddedClient;
|
|
480
|
+
/**
|
|
481
|
+
* Overrides the widget-gateway routing decision for the scoped HTTP client.
|
|
482
|
+
*
|
|
483
|
+
* Any caller reaching the Tesouro API with a widget token must route data
|
|
484
|
+
* requests through the widget gateway: prefix the path with
|
|
485
|
+
* `/api/widget-gateway/proxy` and carry the token as `X-Widget-Token`. The
|
|
486
|
+
* provider applies both automatically per request when the request origin is
|
|
487
|
+
* a known Tesouro API host (`WIDGET_GATEWAY_HOSTS`, derived from the
|
|
488
|
+
* generated `ClientOptions['baseUrl']`); `/api/widget-gateway/*` paths (the
|
|
489
|
+
* init round-trip) always pass through untouched.
|
|
490
|
+
*
|
|
491
|
+
* - `undefined` — decide from the request origin, as above. Inherits from
|
|
492
|
+
* the nearest ancestor or global store like every other config field.
|
|
493
|
+
* - `true` — always apply the rewrite, even for an unlisted base URL (e.g. a
|
|
494
|
+
* custom domain in front of the gateway).
|
|
495
|
+
* - `false` — never apply it. For hosts that route widget requests their own
|
|
496
|
+
* way, such as a same-origin BFF whose `configClient` retargets every
|
|
497
|
+
* request.
|
|
498
|
+
*
|
|
499
|
+
* Independent of {@link configClient}: a host that only adds a header keeps
|
|
500
|
+
* the built-in routing, and the built-in interceptor runs before any
|
|
501
|
+
* `configClient` interceptor.
|
|
502
|
+
*/
|
|
503
|
+
gatewayRouting?: boolean;
|
|
480
504
|
/**
|
|
481
505
|
* Component the embedded widgets should render in place of plain `<a>` tags.
|
|
482
506
|
*
|
|
@@ -653,7 +677,7 @@ type TagsWidgetProps = WidgetProviderProps & TagsWidgetOwnProps;
|
|
|
653
677
|
* <TagsWidget baseUrl="https://api.tesouro.com" widgetToken="wt_..." organizationId="org_..." />
|
|
654
678
|
* ```
|
|
655
679
|
*/
|
|
656
|
-
declare function TagsWidget({ baseUrl, widgetToken, organizationId, configClient, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, ...innerProps }: TagsWidgetProps): React.JSX.Element;
|
|
680
|
+
declare function TagsWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, ...innerProps }: TagsWidgetProps): React.JSX.Element;
|
|
657
681
|
|
|
658
682
|
export { TagsWidget };
|
|
659
683
|
export type { TagDeleteDialogLabels, TagFormSheetLabels, TagMessageLabels, TagsScreenLabels, TagsWidgetProps };
|
package/dist/lib/TeamWidget.d.ts
CHANGED
|
@@ -477,6 +477,30 @@ interface WidgetConfigInput {
|
|
|
477
477
|
* ```
|
|
478
478
|
*/
|
|
479
479
|
configClient?: (client: EmbeddedClient) => EmbeddedClient;
|
|
480
|
+
/**
|
|
481
|
+
* Overrides the widget-gateway routing decision for the scoped HTTP client.
|
|
482
|
+
*
|
|
483
|
+
* Any caller reaching the Tesouro API with a widget token must route data
|
|
484
|
+
* requests through the widget gateway: prefix the path with
|
|
485
|
+
* `/api/widget-gateway/proxy` and carry the token as `X-Widget-Token`. The
|
|
486
|
+
* provider applies both automatically per request when the request origin is
|
|
487
|
+
* a known Tesouro API host (`WIDGET_GATEWAY_HOSTS`, derived from the
|
|
488
|
+
* generated `ClientOptions['baseUrl']`); `/api/widget-gateway/*` paths (the
|
|
489
|
+
* init round-trip) always pass through untouched.
|
|
490
|
+
*
|
|
491
|
+
* - `undefined` — decide from the request origin, as above. Inherits from
|
|
492
|
+
* the nearest ancestor or global store like every other config field.
|
|
493
|
+
* - `true` — always apply the rewrite, even for an unlisted base URL (e.g. a
|
|
494
|
+
* custom domain in front of the gateway).
|
|
495
|
+
* - `false` — never apply it. For hosts that route widget requests their own
|
|
496
|
+
* way, such as a same-origin BFF whose `configClient` retargets every
|
|
497
|
+
* request.
|
|
498
|
+
*
|
|
499
|
+
* Independent of {@link configClient}: a host that only adds a header keeps
|
|
500
|
+
* the built-in routing, and the built-in interceptor runs before any
|
|
501
|
+
* `configClient` interceptor.
|
|
502
|
+
*/
|
|
503
|
+
gatewayRouting?: boolean;
|
|
480
504
|
/**
|
|
481
505
|
* Component the embedded widgets should render in place of plain `<a>` tags.
|
|
482
506
|
*
|
|
@@ -814,7 +838,7 @@ interface TeamWidgetProps extends WidgetProviderProps {
|
|
|
814
838
|
*/
|
|
815
839
|
acceptInviteRedirectUri?: string;
|
|
816
840
|
}
|
|
817
|
-
declare function TeamWidget({ baseUrl, widgetToken, organizationId, configClient, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, ...innerProps }: TeamWidgetProps): React.JSX.Element;
|
|
841
|
+
declare function TeamWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, ...innerProps }: TeamWidgetProps): React.JSX.Element;
|
|
818
842
|
|
|
819
843
|
export { TeamWidget };
|
|
820
844
|
export type { FeatureLabels as TeamWidgetFeatureLabels, Labels as TeamWidgetLabels, TeamWidgetProps };
|
|
@@ -477,6 +477,30 @@ interface WidgetConfigInput {
|
|
|
477
477
|
* ```
|
|
478
478
|
*/
|
|
479
479
|
configClient?: (client: EmbeddedClient) => EmbeddedClient;
|
|
480
|
+
/**
|
|
481
|
+
* Overrides the widget-gateway routing decision for the scoped HTTP client.
|
|
482
|
+
*
|
|
483
|
+
* Any caller reaching the Tesouro API with a widget token must route data
|
|
484
|
+
* requests through the widget gateway: prefix the path with
|
|
485
|
+
* `/api/widget-gateway/proxy` and carry the token as `X-Widget-Token`. The
|
|
486
|
+
* provider applies both automatically per request when the request origin is
|
|
487
|
+
* a known Tesouro API host (`WIDGET_GATEWAY_HOSTS`, derived from the
|
|
488
|
+
* generated `ClientOptions['baseUrl']`); `/api/widget-gateway/*` paths (the
|
|
489
|
+
* init round-trip) always pass through untouched.
|
|
490
|
+
*
|
|
491
|
+
* - `undefined` — decide from the request origin, as above. Inherits from
|
|
492
|
+
* the nearest ancestor or global store like every other config field.
|
|
493
|
+
* - `true` — always apply the rewrite, even for an unlisted base URL (e.g. a
|
|
494
|
+
* custom domain in front of the gateway).
|
|
495
|
+
* - `false` — never apply it. For hosts that route widget requests their own
|
|
496
|
+
* way, such as a same-origin BFF whose `configClient` retargets every
|
|
497
|
+
* request.
|
|
498
|
+
*
|
|
499
|
+
* Independent of {@link configClient}: a host that only adds a header keeps
|
|
500
|
+
* the built-in routing, and the built-in interceptor runs before any
|
|
501
|
+
* `configClient` interceptor.
|
|
502
|
+
*/
|
|
503
|
+
gatewayRouting?: boolean;
|
|
480
504
|
/**
|
|
481
505
|
* Component the embedded widgets should render in place of plain `<a>` tags.
|
|
482
506
|
*
|
|
@@ -561,6 +561,30 @@ interface WidgetConfigInput {
|
|
|
561
561
|
* ```
|
|
562
562
|
*/
|
|
563
563
|
configClient?: (client: EmbeddedClient) => EmbeddedClient;
|
|
564
|
+
/**
|
|
565
|
+
* Overrides the widget-gateway routing decision for the scoped HTTP client.
|
|
566
|
+
*
|
|
567
|
+
* Any caller reaching the Tesouro API with a widget token must route data
|
|
568
|
+
* requests through the widget gateway: prefix the path with
|
|
569
|
+
* `/api/widget-gateway/proxy` and carry the token as `X-Widget-Token`. The
|
|
570
|
+
* provider applies both automatically per request when the request origin is
|
|
571
|
+
* a known Tesouro API host (`WIDGET_GATEWAY_HOSTS`, derived from the
|
|
572
|
+
* generated `ClientOptions['baseUrl']`); `/api/widget-gateway/*` paths (the
|
|
573
|
+
* init round-trip) always pass through untouched.
|
|
574
|
+
*
|
|
575
|
+
* - `undefined` — decide from the request origin, as above. Inherits from
|
|
576
|
+
* the nearest ancestor or global store like every other config field.
|
|
577
|
+
* - `true` — always apply the rewrite, even for an unlisted base URL (e.g. a
|
|
578
|
+
* custom domain in front of the gateway).
|
|
579
|
+
* - `false` — never apply it. For hosts that route widget requests their own
|
|
580
|
+
* way, such as a same-origin BFF whose `configClient` retargets every
|
|
581
|
+
* request.
|
|
582
|
+
*
|
|
583
|
+
* Independent of {@link configClient}: a host that only adds a header keeps
|
|
584
|
+
* the built-in routing, and the built-in interceptor runs before any
|
|
585
|
+
* `configClient` interceptor.
|
|
586
|
+
*/
|
|
587
|
+
gatewayRouting?: boolean;
|
|
564
588
|
/**
|
|
565
589
|
* Component the embedded widgets should render in place of plain `<a>` tags.
|
|
566
590
|
*
|
|
@@ -914,7 +938,7 @@ interface RootWidgetProviderProps extends WidgetProviderBaseProps {
|
|
|
914
938
|
* @see {@link useWidgetConfig} to read the resolved config in descendants
|
|
915
939
|
* @see {@link setGlobalWidgetConfig} to push config imperatively from outside React
|
|
916
940
|
*/
|
|
917
|
-
declare function RootWidgetProvider({ children, baseUrl, widgetToken, organizationId, configClient, linkComponent, uiFramework, implementation, analytics, unstable_initResponseOverride, }: PropsWithChildren<RootWidgetProviderProps>): React.JSX.Element;
|
|
941
|
+
declare function RootWidgetProvider({ children, baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, uiFramework, implementation, analytics, unstable_initResponseOverride, }: PropsWithChildren<RootWidgetProviderProps>): React.JSX.Element;
|
|
918
942
|
|
|
919
943
|
/**
|
|
920
944
|
* Props for {@link WidgetProvider}.
|
|
@@ -476,6 +476,30 @@ interface WidgetConfigInput {
|
|
|
476
476
|
* ```
|
|
477
477
|
*/
|
|
478
478
|
configClient?: (client: EmbeddedClient) => EmbeddedClient;
|
|
479
|
+
/**
|
|
480
|
+
* Overrides the widget-gateway routing decision for the scoped HTTP client.
|
|
481
|
+
*
|
|
482
|
+
* Any caller reaching the Tesouro API with a widget token must route data
|
|
483
|
+
* requests through the widget gateway: prefix the path with
|
|
484
|
+
* `/api/widget-gateway/proxy` and carry the token as `X-Widget-Token`. The
|
|
485
|
+
* provider applies both automatically per request when the request origin is
|
|
486
|
+
* a known Tesouro API host (`WIDGET_GATEWAY_HOSTS`, derived from the
|
|
487
|
+
* generated `ClientOptions['baseUrl']`); `/api/widget-gateway/*` paths (the
|
|
488
|
+
* init round-trip) always pass through untouched.
|
|
489
|
+
*
|
|
490
|
+
* - `undefined` — decide from the request origin, as above. Inherits from
|
|
491
|
+
* the nearest ancestor or global store like every other config field.
|
|
492
|
+
* - `true` — always apply the rewrite, even for an unlisted base URL (e.g. a
|
|
493
|
+
* custom domain in front of the gateway).
|
|
494
|
+
* - `false` — never apply it. For hosts that route widget requests their own
|
|
495
|
+
* way, such as a same-origin BFF whose `configClient` retargets every
|
|
496
|
+
* request.
|
|
497
|
+
*
|
|
498
|
+
* Independent of {@link configClient}: a host that only adds a header keeps
|
|
499
|
+
* the built-in routing, and the built-in interceptor runs before any
|
|
500
|
+
* `configClient` interceptor.
|
|
501
|
+
*/
|
|
502
|
+
gatewayRouting?: boolean;
|
|
479
503
|
/**
|
|
480
504
|
* Component the embedded widgets should render in place of plain `<a>` tags.
|
|
481
505
|
*
|
package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/index4.js
CHANGED
|
@@ -113,20 +113,21 @@ function S({ invitationToken: e, userId: t, labelOverrides: n, content: i, label
|
|
|
113
113
|
errorMessage: p
|
|
114
114
|
});
|
|
115
115
|
}
|
|
116
|
-
function C({ baseUrl: e, widgetToken: n, organizationId: r, configClient: i,
|
|
116
|
+
function C({ baseUrl: e, widgetToken: n, organizationId: r, configClient: i, gatewayRouting: a, linkComponent: o, implementation: c, uiFramework: l, errorFallback: u, onError: d, analytics: f, ...p }) {
|
|
117
117
|
return /* @__PURE__ */ _(s, {
|
|
118
118
|
widgetName: t,
|
|
119
119
|
baseUrl: e,
|
|
120
120
|
widgetToken: n,
|
|
121
121
|
organizationId: r,
|
|
122
122
|
configClient: i,
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
123
|
+
gatewayRouting: a,
|
|
124
|
+
linkComponent: o,
|
|
125
|
+
implementation: c,
|
|
126
|
+
uiFramework: l,
|
|
127
|
+
errorFallback: u,
|
|
128
|
+
onError: d,
|
|
129
|
+
analytics: f,
|
|
130
|
+
children: /* @__PURE__ */ _(x, { ...p })
|
|
130
131
|
});
|
|
131
132
|
}
|
|
132
133
|
//#endregion
|