@tesouro/embedded-components-react 0.2.260 → 0.2.261

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 CHANGED
@@ -481,10 +481,11 @@ A self-contained, read-only profile card for the current entity user. It shows a
481
481
 
482
482
  #### Props
483
483
 
484
- | Prop | Type | Description |
485
- | --------------- | ------------------------ | ----------------------------------------------------- |
486
- | `labels` | `Partial<Labels>` | Overrides the card's own copy (loading announcement). |
487
- | `featureLabels` | `Partial<FeatureLabels>` | Overrides tab labels, field labels, and the subtitle. |
484
+ | Prop | Type | Description |
485
+ | --------------- | ------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
486
+ | `labels` | `Partial<Labels>` | Overrides the card's own copy (loading announcement, contact line). |
487
+ | `featureLabels` | `Partial<FeatureLabels>` | Overrides tab labels, field labels, and the subtitle. |
488
+ | `contactUrl` | `string` | Where the "to change this information, contact your bank" line links (a support page URL or a `mailto:`). Left unset, the card shows the plain unlinked subtitle instead. The bank name in that line comes from widget init, so no other value is needed. |
488
489
 
489
490
  ### ReceivablesWidget
490
491
 
@@ -537,21 +538,25 @@ A composite settings widget that combines Monite document settings, tags, GL cod
537
538
 
538
539
  #### Props
539
540
 
540
- | Prop | Type | Default | Description |
541
- | ------------------------- | ------------------------ | --------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
542
- | `acceptInviteRedirectUri` | `string` | Same-origin `/accept-invite` | Forwarded to the Team section's widget — allowlisted URL invite emails link to. Defaults to `${window.location.origin}/accept-invite`; set it when the host app's registered landing route differs from the widget's same-origin default, or the origin is not on the OIDC redirect-URI allowlist (preview/localhost). |
543
- | `labels` | `Partial<Labels>` | English labels | Overrides the settings heading copy. |
544
- | `featureLabels` | `Partial<FeatureLabels>` | English labels | Overrides section labels. |
545
- | `profileContent` | `ReactNode` | Profile widget | Replaces the profile section content. |
546
- | `teamContent` | `ReactNode` | Empty | Supplies the team section content. |
547
- | `invoiceContent` | `ReactNode` | Monite template settings | Replaces invoice settings content. |
548
- | `billPayContent` | `ReactNode` | Monite approval policies | Replaces bill-pay settings content. |
549
- | `accountingContent` | `ReactNode` | GL code table widget | Replaces accounting content. |
550
- | `tagsContent` | `ReactNode` | Monite tags | Replaces tags content. |
551
- | `expenseContent` | `ReactNode` | Expense policies and requirements | Replaces expense content. |
552
- | `helpContactUrl` | `string` | `undefined` | Forwarded to the Help section's widget — where its "Contact Us" line links (a support page URL or a `mailto:`). The line is hidden while unset, since the package has no tenant-agnostic support address to fall back on; the bank name in that line comes from widget init. |
553
- | `helpContent` | `ReactNode` | Help widget | Replaces the help section content. |
554
- | `finopsThemeColors` | `FinopsThemeColors` | `undefined` | Optional Monite theme color overrides. |
541
+ | Prop | Type | Default | Description |
542
+ | ------------------------- | -------------------------------------------- | --------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
543
+ | `acceptInviteRedirectUri` | `string` | Same-origin `/accept-invite` | Forwarded to the Team section's widget — allowlisted URL invite emails link to. Defaults to `${window.location.origin}/accept-invite`; set it when the host app's registered landing route differs from the widget's same-origin default, or the origin is not on the OIDC redirect-URI allowlist (preview/localhost). |
544
+ | `labels` | `Partial<Labels>` | English labels | Overrides the settings heading copy. |
545
+ | `featureLabels` | `Partial<FeatureLabels>` | English labels | Overrides section labels. |
546
+ | `profileContent` | `ReactNode` | Profile widget | Replaces the profile section content. |
547
+ | `teamContent` | `ReactNode` | Empty | Supplies the team section content. |
548
+ | `invoiceContent` | `ReactNode` | Monite template settings | Replaces invoice settings content. |
549
+ | `billPayContent` | `ReactNode` | Monite approval policies | Replaces bill-pay settings content. |
550
+ | `accountingContent` | `ReactNode` | GL code table widget | Replaces accounting content. |
551
+ | `tagsContent` | `ReactNode` | Monite tags | Replaces tags content. |
552
+ | `expenseContent` | `ReactNode` | Expense policies and requirements | Replaces expense content. |
553
+ | `profileContactUrl` | `string` | `undefined` | Forwarded to the Profile section's widget — where its "to change this information, contact your bank" line links. Left unset, the card shows the plain unlinked sentence instead; the bank name comes from widget init. |
554
+ | `selectedSection` | `SettingsWidgetSectionId` | `undefined` | The section to show. Leave unset to let the widget own the selection; supply it (with `onSelectedSectionChange`) to drive navigation from a route or search param. A section the user's scopes hide falls back to the first visible one. |
555
+ | `onSelectedSectionChange` | `(section: SettingsWidgetSectionId) => void` | `undefined` | Called with the id of the section the user selected. Fires whether or not `selectedSection` is supplied, so a host can mirror the selection into its URL without taking ownership of it. |
556
+ | `additionalSections` | `SettingsWidgetAdditionalSection[]` | `undefined` | Host-owned sections rendered alongside the built-in ones. Each is `{ id, label, content }` plus an optional `after` naming the built-in section to place it behind. Unlike the built-ins, these are not scope-gated. |
557
+ | `helpContactUrl` | `string` | `undefined` | Forwarded to the Help section's widget — where its "Contact Us" line links (a support page URL or a `mailto:`). The line is hidden while unset, since the package has no tenant-agnostic support address to fall back on; the bank name in that line comes from widget init. |
558
+ | `helpContent` | `ReactNode` | Help widget | Replaces the help section content. |
559
+ | `finopsThemeColors` | `FinopsThemeColors` | `undefined` | Optional Monite theme color overrides. |
555
560
 
556
561
  ### TagsWidget
557
562
 
package/dist/index.d.ts CHANGED
@@ -3976,6 +3976,14 @@ declare function ProductsWidget({ baseUrl, widgetToken, organizationId, configCl
3976
3976
  interface Labels$2 {
3977
3977
  loadingLabel: string;
3978
3978
  errorLabel: string;
3979
+ /**
3980
+ * Lead-in for the contact line, rendered as
3981
+ * `{contactPrefix} {bankName} {link}.` when both a bank name and a contact
3982
+ * URL are available.
3983
+ */
3984
+ contactPrefix: string;
3985
+ /** Text of the contact link (wraps the contact URL). */
3986
+ contactLinkText: string;
3979
3987
  }
3980
3988
 
3981
3989
  interface FeatureLabels$3 {
@@ -3995,6 +4003,14 @@ interface FeatureLabels$3 {
3995
4003
  interface ProfileWidgetProps extends WidgetProviderProps {
3996
4004
  labels?: Partial<Labels$2>;
3997
4005
  featureLabels?: Partial<FeatureLabels$3>;
4006
+ /**
4007
+ * Where the "to change this information, contact your bank" line links (a
4008
+ * support page URL or a `mailto:`). Left unset, the card shows the plain
4009
+ * unlinked sentence instead — the package has no tenant-agnostic support
4010
+ * address to fall back on. The bank name in that line comes from widget init,
4011
+ * so this is the only value a host needs to supply.
4012
+ */
4013
+ contactUrl?: string;
3998
4014
  }
3999
4015
  declare function ProfileWidget({ baseUrl, widgetToken, organizationId, configClient, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, ...innerProps }: ProfileWidgetProps): React.JSX.Element;
4000
4016
 
@@ -4012,6 +4028,12 @@ interface Labels$1 {
4012
4028
  description?: string;
4013
4029
  }
4014
4030
 
4031
+ interface SettingsWidgetSection {
4032
+ id: string;
4033
+ label: string;
4034
+ content: ReactNode;
4035
+ }
4036
+
4015
4037
  interface FeatureLabels$2 {
4016
4038
  profileSection: string;
4017
4039
  teamSection: string;
@@ -4025,6 +4047,46 @@ interface FeatureLabels$2 {
4025
4047
  expenseRequirementsTab: string;
4026
4048
  }
4027
4049
 
4050
+ /**
4051
+ * The sections this widget renders itself. These ids are the public vocabulary
4052
+ * a host uses to deep-link into a section, so they are part of the package's
4053
+ * API surface — renaming one is a breaking change.
4054
+ */
4055
+ declare const SettingsSection: {
4056
+ readonly Profile: "profile";
4057
+ readonly Team: "team";
4058
+ readonly Invoice: "invoice";
4059
+ readonly Expense: "expense";
4060
+ readonly BillPay: "bill-pay";
4061
+ readonly Accounting: "accounting";
4062
+ readonly Tags: "tags";
4063
+ readonly Help: "help";
4064
+ };
4065
+ type SettingsSection = (typeof SettingsSection)[keyof typeof SettingsSection];
4066
+ /**
4067
+ * A selectable section id: one of the built-ins, or the id of a host-supplied
4068
+ * {@link SettingsWidgetAdditionalSection}. The `string & {}` arm keeps the
4069
+ * built-in literals visible to editor autocomplete while still accepting a
4070
+ * host's own id.
4071
+ */
4072
+ type SettingsWidgetSectionId = SettingsSection | (string & {});
4073
+ /**
4074
+ * A section contributed by the host, rendered alongside the built-in ones.
4075
+ *
4076
+ * This exists for surfaces the published package cannot own — the white-label
4077
+ * dashboard's password management, for instance, which is an app-auth concern
4078
+ * rather than an embedded one. Prefer the `*Content` props when replacing the
4079
+ * content of a section that already exists.
4080
+ */
4081
+ interface SettingsWidgetAdditionalSection extends SettingsWidgetSection {
4082
+ /**
4083
+ * Place this section immediately after the named built-in one. Sections with
4084
+ * no `after` — and those whose anchor is hidden by scope gating — are
4085
+ * appended to the end of the list.
4086
+ */
4087
+ after?: SettingsSection;
4088
+ }
4089
+
4028
4090
  interface SettingsWidgetProps extends MoniteRegionProviderProps {
4029
4091
  labels?: Partial<Labels$1>;
4030
4092
  featureLabels?: Partial<FeatureLabels$2>;
@@ -4040,6 +4102,22 @@ interface SettingsWidgetProps extends MoniteRegionProviderProps {
4040
4102
  * support address to fall back on. The bank name in that line comes from
4041
4103
  * widget init, so this is the only value a host needs to supply. */
4042
4104
  helpContactUrl?: string;
4105
+ /** Forwarded to the embedded Profile section's {@link ProfileWidget} — where
4106
+ * its "to change this information, contact your bank" line links. The line
4107
+ * falls back to a plain, unlinked sentence when unset, for the same reason
4108
+ * {@link SettingsWidgetProps.helpContactUrl} does. */
4109
+ profileContactUrl?: string;
4110
+ /** The section to show. Leave unset to let the widget own the selection;
4111
+ * supply it (with {@link SettingsWidgetProps.onSelectedSectionChange}) to
4112
+ * drive navigation from a route, a search param, or host state. A section
4113
+ * hidden by the user's scopes falls back to the first visible one. */
4114
+ selectedSection?: SettingsWidgetSectionId;
4115
+ /** Called with the id of the section the user selected. Fires whether or not
4116
+ * {@link SettingsWidgetProps.selectedSection} is supplied, so a host can mirror
4117
+ * the selection into its URL without taking ownership of it. */
4118
+ onSelectedSectionChange?: (section: SettingsWidgetSectionId) => void;
4119
+ /** Host-owned sections rendered alongside the built-in ones. */
4120
+ additionalSections?: SettingsWidgetAdditionalSection[];
4043
4121
  profileContent?: ReactNode;
4044
4122
  teamContent?: ReactNode;
4045
4123
  billPayContent?: ReactNode;
@@ -4555,5 +4633,5 @@ interface GapCoverageAlertProps {
4555
4633
 
4556
4634
  type PendingFeatureStyleSources = GapCoverageAlertProps | NoPolicyBannerProps;
4557
4635
 
4558
- export { ACCEPT_DISCLOSURES_WIDGET_LABELS_EN, ACCOUNT_DELETE_DIALOG_LABELS_EN, ACCOUNT_FORM_SHEET_LABELS_EN, ADDITIONAL_OWNERS_LABELS_EN, AcceptDisclosuresWidget, AccountDeleteDialog, AccountFormSheet, BALANCES_WIDGET_LABELS_EN, BUSINESS_DETAILS_LABELS_EN, BalancesWidget, BankAccountOnboardingWidget, BankAccountsWidget, BillPayWidget, CHART_OF_ACCOUNTS_LABELS_EN, CHART_OF_ACCOUNTS_MESSAGE_LABELS_EN, CREATE_CARD_FEATURE_LABELS_EN, CardDetailsWidget, CardFormatValue, CardsWidget, ChartOfAccountsTable, ChartOfAccountsWidget, CounterpartsWidget, CreateCardWidget, ExpenseApprovalPoliciesWidget, ExpenseManagementWidget, ExpenseRequirementsWidget, HELP_FAQ_EN, HELP_WIDGET_LABELS_EN, HelpWidget, INSIGHTS_FEATURE_LABELS_EN, INSIGHTS_WIDGET_LABELS_EN, Implementation, InsightsWidget, ReceivablesWidgetMonite as InvoicingWidget, LinkedAccountsWidget, PERSONAL_DETAILS_LABELS_EN, ProductsWidget, ProfileWidget, RESULT_LABELS_EN, ReceiptMatchWidget, ReceivablesWidget, RefreshingRootWidgetProvider, RootWidgetProvider, SINGLE_INSIGHT_LABELS_EN, SettingsWidget, DEFAULT_FEATURE_LABELS as TRANSFERS_FEATURE_LABELS_EN, TRANSFERS_WIDGET_LABELS_EN, TagsWidget, TeamWidget, TransfersWidget, UIFramework, UploadReceiptWidget, WidgetProvider, WidgetTokenRefreshProvider, cloneEmbeddedClient, getGlobalWidgetConfig, getGlobalWidgetInitState, registerDesignSystemEnsurer, registerUIRenderers, resolveCreateCardFeatureLabels, setGlobalWidgetConfig, subscribeToGlobalWidgetInitState, updateGlobalWidgetConfig, useOwnWidgetConfig, useRefetchWidget, useWidgetConfig, useWidgetError, useWidgetLoading, useWidgetToken };
4559
- export type { AcceptDisclosuresLinks, AcceptDisclosuresWidgetLabels, AcceptDisclosuresWidgetProps, AccountDeleteDialogLabels, AccountDeleteDialogProps, Labels$5 as AccountDetailsWidgetLabels, AccountFormErrors, AccountFormMode, AccountFormSheetLabels, AccountFormSheetProps, AccountFormValues, AdditionalOwner, AdditionalOwnersLabels, AddressFormSheetLabels, BalancesWidgetLabels, BalancesWidgetProps, BankAccountFormSheetLabels, BankAccountOnboardingWidgetLabels, BankAccountOnboardingWidgetProps, FeatureLabels$5 as BankAccountsWidgetFeatureLabels, Labels$6 as BankAccountsWidgetLabels, BankAccountsWidgetProps, BillPayWidgetProps, BusinessDetailsLabels, BusinessDetailsValues, CardDetailsFeatureLabels, CardDetailsPanelLabels as CardDetailsWidgetLabels, CardDetailsWidgetProps, CardsFeatureLabels as CardsWidgetFeatureLabels, CardsListLabels as CardsWidgetLabels, CardsWidgetPagination, CardsWidgetProps, ChartOfAccountsLabels, ChartOfAccountsMessageLabels, ChartOfAccountsTableProps, ChartOfAccountsWidgetLabelProps, ChartOfAccountsWidgetProps, CompanyStructureValue, ConfirmDeleteDialogLabels, CounterpartDetailsSheetLabels, CounterpartFormSheetLabels, CounterpartMessageLabels, CounterpartMode, CounterpartsScreenLabels, CounterpartsWidgetProps, CreateCardFeatureLabels, CreateCardWidgetLabels, CreateCardWidgetProps, DisclosureLinks, EmbeddedClient, ExpenseApprovalPoliciesWidgetProps, Labels$4 as ExpenseManagementWidgetLabels, ExpenseManagementWidgetProps, ExpenseRequirementsWidgetProps, HelpFaqAnswer, HelpFaqBullet, HelpFaqBulletType, HelpFaqItem, HelpFaqSection, HelpWidgetLabels, HelpWidgetProps, InsightsFeatureLabels, InsightsWidgetLabels, InsightsWidgetProps, ReceivablesWidgetMoniteProps as InvoicingWidgetProps, LedgerAccountRow, LinkComponent, LinkComponentProps, FeatureLabels$4 as LinkedAccountsWidgetFeatureLabels, Labels$3 as LinkedAccountsWidgetLabels, LinkedAccountsWidgetProps, MarketingWidgetContent, MeasureUnitDeleteDialogLabels, MeasureUnitsManagerLabels, PendingFeatureStyleSources, PersonalDetailsLabels, PersonalDetailsValues, ProductDeleteDialogLabels, ProductDetailsSheetLabels, ProductFormSheetLabels, ProductMessageLabels, ProductsScreenLabels, ProductsWidgetProps, FeatureLabels$3 as ProfileWidgetFeatureLabels, Labels$2 as ProfileWidgetLabels, ProfileWidgetProps, ReceiptMatchSummary, ReceiptMatchWidgetProps, ReceivableActionDialogLabels, ReceivableDetailsSheetLabelOverrides, ReceivableDetailsSheetLabels, ReceivableDocumentType, ReceivableFormSheetLabels, ReceivableMessageLabels, ReceivablePaymentDialogLabels, ReceivableSendDialogLabels, ReceivableStatusBadgeLabels, ReceivablesScreenLabelOverrides, ReceivablesScreenLabels, ReceivablesWidgetProps, ReceivablesWidgetTab, RefreshingRootWidgetProviderProps, ResultLabels, RootWidgetProviderProps, FeatureLabels$2 as SettingsWidgetFeatureLabels, Labels$1 as SettingsWidgetLabels, SettingsWidgetProps, SingleInsightLabels, TagDeleteDialogLabels, TagFormSheetLabels, TagMessageLabels, TagsScreenLabels, TagsWidgetProps, FeatureLabels$1 as TeamWidgetFeatureLabels, Labels as TeamWidgetLabels, TeamWidgetProps, FeatureLabels as TransfersWidgetFeatureLabels, TransfersWidgetLabels, TransfersWidgetProps, UploadReceiptWidgetProps, WidgetConfig, WidgetConfigInput, WidgetInitResponse, WidgetInitState, WidgetProviderProps, WidgetTokenFetcher, WidgetTokenManager, WidgetTokenRefreshProviderProps, WidgetTokenState };
4636
+ export { ACCEPT_DISCLOSURES_WIDGET_LABELS_EN, ACCOUNT_DELETE_DIALOG_LABELS_EN, ACCOUNT_FORM_SHEET_LABELS_EN, ADDITIONAL_OWNERS_LABELS_EN, AcceptDisclosuresWidget, AccountDeleteDialog, AccountFormSheet, BALANCES_WIDGET_LABELS_EN, BUSINESS_DETAILS_LABELS_EN, BalancesWidget, BankAccountOnboardingWidget, BankAccountsWidget, BillPayWidget, CHART_OF_ACCOUNTS_LABELS_EN, CHART_OF_ACCOUNTS_MESSAGE_LABELS_EN, CREATE_CARD_FEATURE_LABELS_EN, CardDetailsWidget, CardFormatValue, CardsWidget, ChartOfAccountsTable, ChartOfAccountsWidget, CounterpartsWidget, CreateCardWidget, ExpenseApprovalPoliciesWidget, ExpenseManagementWidget, ExpenseRequirementsWidget, HELP_FAQ_EN, HELP_WIDGET_LABELS_EN, HelpWidget, INSIGHTS_FEATURE_LABELS_EN, INSIGHTS_WIDGET_LABELS_EN, Implementation, InsightsWidget, ReceivablesWidgetMonite as InvoicingWidget, LinkedAccountsWidget, PERSONAL_DETAILS_LABELS_EN, ProductsWidget, ProfileWidget, RESULT_LABELS_EN, ReceiptMatchWidget, ReceivablesWidget, RefreshingRootWidgetProvider, RootWidgetProvider, SINGLE_INSIGHT_LABELS_EN, SettingsSection, SettingsWidget, DEFAULT_FEATURE_LABELS as TRANSFERS_FEATURE_LABELS_EN, TRANSFERS_WIDGET_LABELS_EN, TagsWidget, TeamWidget, TransfersWidget, UIFramework, UploadReceiptWidget, WidgetProvider, WidgetTokenRefreshProvider, cloneEmbeddedClient, getGlobalWidgetConfig, getGlobalWidgetInitState, registerDesignSystemEnsurer, registerUIRenderers, resolveCreateCardFeatureLabels, setGlobalWidgetConfig, subscribeToGlobalWidgetInitState, updateGlobalWidgetConfig, useOwnWidgetConfig, useRefetchWidget, useWidgetConfig, useWidgetError, useWidgetLoading, useWidgetToken };
4637
+ export type { AcceptDisclosuresLinks, AcceptDisclosuresWidgetLabels, AcceptDisclosuresWidgetProps, AccountDeleteDialogLabels, AccountDeleteDialogProps, Labels$5 as AccountDetailsWidgetLabels, AccountFormErrors, AccountFormMode, AccountFormSheetLabels, AccountFormSheetProps, AccountFormValues, AdditionalOwner, AdditionalOwnersLabels, AddressFormSheetLabels, BalancesWidgetLabels, BalancesWidgetProps, BankAccountFormSheetLabels, BankAccountOnboardingWidgetLabels, BankAccountOnboardingWidgetProps, FeatureLabels$5 as BankAccountsWidgetFeatureLabels, Labels$6 as BankAccountsWidgetLabels, BankAccountsWidgetProps, BillPayWidgetProps, BusinessDetailsLabels, BusinessDetailsValues, CardDetailsFeatureLabels, CardDetailsPanelLabels as CardDetailsWidgetLabels, CardDetailsWidgetProps, CardsFeatureLabels as CardsWidgetFeatureLabels, CardsListLabels as CardsWidgetLabels, CardsWidgetPagination, CardsWidgetProps, ChartOfAccountsLabels, ChartOfAccountsMessageLabels, ChartOfAccountsTableProps, ChartOfAccountsWidgetLabelProps, ChartOfAccountsWidgetProps, CompanyStructureValue, ConfirmDeleteDialogLabels, CounterpartDetailsSheetLabels, CounterpartFormSheetLabels, CounterpartMessageLabels, CounterpartMode, CounterpartsScreenLabels, CounterpartsWidgetProps, CreateCardFeatureLabels, CreateCardWidgetLabels, CreateCardWidgetProps, DisclosureLinks, EmbeddedClient, ExpenseApprovalPoliciesWidgetProps, Labels$4 as ExpenseManagementWidgetLabels, ExpenseManagementWidgetProps, ExpenseRequirementsWidgetProps, HelpFaqAnswer, HelpFaqBullet, HelpFaqBulletType, HelpFaqItem, HelpFaqSection, HelpWidgetLabels, HelpWidgetProps, InsightsFeatureLabels, InsightsWidgetLabels, InsightsWidgetProps, ReceivablesWidgetMoniteProps as InvoicingWidgetProps, LedgerAccountRow, LinkComponent, LinkComponentProps, FeatureLabels$4 as LinkedAccountsWidgetFeatureLabels, Labels$3 as LinkedAccountsWidgetLabels, LinkedAccountsWidgetProps, MarketingWidgetContent, MeasureUnitDeleteDialogLabels, MeasureUnitsManagerLabels, PendingFeatureStyleSources, PersonalDetailsLabels, PersonalDetailsValues, ProductDeleteDialogLabels, ProductDetailsSheetLabels, ProductFormSheetLabels, ProductMessageLabels, ProductsScreenLabels, ProductsWidgetProps, FeatureLabels$3 as ProfileWidgetFeatureLabels, Labels$2 as ProfileWidgetLabels, ProfileWidgetProps, ReceiptMatchSummary, ReceiptMatchWidgetProps, ReceivableActionDialogLabels, ReceivableDetailsSheetLabelOverrides, ReceivableDetailsSheetLabels, ReceivableDocumentType, ReceivableFormSheetLabels, ReceivableMessageLabels, ReceivablePaymentDialogLabels, ReceivableSendDialogLabels, ReceivableStatusBadgeLabels, ReceivablesScreenLabelOverrides, ReceivablesScreenLabels, ReceivablesWidgetProps, ReceivablesWidgetTab, RefreshingRootWidgetProviderProps, ResultLabels, RootWidgetProviderProps, SettingsWidgetAdditionalSection, FeatureLabels$2 as SettingsWidgetFeatureLabels, Labels$1 as SettingsWidgetLabels, SettingsWidgetProps, SettingsWidgetSection, SettingsWidgetSectionId, SingleInsightLabels, TagDeleteDialogLabels, TagFormSheetLabels, TagMessageLabels, TagsScreenLabels, TagsWidgetProps, FeatureLabels$1 as TeamWidgetFeatureLabels, Labels as TeamWidgetLabels, TeamWidgetProps, FeatureLabels as TransfersWidgetFeatureLabels, TransfersWidgetLabels, TransfersWidgetProps, UploadReceiptWidgetProps, WidgetConfig, WidgetConfigInput, WidgetInitResponse, WidgetInitState, WidgetProviderProps, WidgetTokenFetcher, WidgetTokenManager, WidgetTokenRefreshProviderProps, WidgetTokenState };
package/dist/index.js CHANGED
@@ -70,17 +70,18 @@ import "./lib/ProfileWidget.js";
70
70
  import "./lib/ReceivablesWidget.js";
71
71
  import { ReceiptMatchWidget as se } from "./libs/tesouro-embedded-components-react/expense-receipt-match-widget/feature/dist/lib/ReceiptMatchWidget.js";
72
72
  import "./lib/ReceiptMatchWidget.js";
73
- import { TagsWidget as ce } from "./libs/tesouro-embedded-components-react/tags-widget/feature/dist/index11.js";
74
- import { TeamWidget as le } from "./libs/tesouro-embedded-components-react/team-widget/feature/dist/index17.js";
75
- import { SettingsWidget as ue } from "./libs/tesouro-embedded-components-react/settings-widget/feature/dist/index5.js";
73
+ import { SettingsSection as ce } from "./libs/tesouro-embedded-components-react/settings-widget/feature/dist/index4.js";
74
+ import { TagsWidget as le } from "./libs/tesouro-embedded-components-react/tags-widget/feature/dist/index11.js";
75
+ import { TeamWidget as ue } from "./libs/tesouro-embedded-components-react/team-widget/feature/dist/index17.js";
76
+ import { SettingsWidget as de } from "./libs/tesouro-embedded-components-react/settings-widget/feature/dist/index6.js";
76
77
  import "./lib/SettingsWidget.js";
77
78
  import "./lib/TagsWidget.js";
78
79
  import "./lib/TeamWidget.js";
79
- import { DEFAULT_FEATURE_LABELS as de } from "./libs/tesouro-embedded-components-react/transfers-widget/feature/dist/index3.js";
80
- import { TRANSFERS_WIDGET_LABELS_EN as fe } from "./libs/tesouro-embedded-components-react/transfers-widget/ui/dist/index9.js";
81
- import { TransfersWidget as pe } from "./libs/tesouro-embedded-components-react/transfers-widget/feature/dist/index6.js";
80
+ import { DEFAULT_FEATURE_LABELS as fe } from "./libs/tesouro-embedded-components-react/transfers-widget/feature/dist/index3.js";
81
+ import { TRANSFERS_WIDGET_LABELS_EN as pe } from "./libs/tesouro-embedded-components-react/transfers-widget/ui/dist/index9.js";
82
+ import { TransfersWidget as me } from "./libs/tesouro-embedded-components-react/transfers-widget/feature/dist/index6.js";
82
83
  import "./lib/TransfersWidget.js";
83
84
  import "./lib/UploadReceiptWidget.js";
84
- import { WidgetProvider as me } from "./lib/WidgetProviderPublic.js";
85
+ import { WidgetProvider as he } from "./lib/WidgetProviderPublic.js";
85
86
  import "./lib/WidgetProvider.js";
86
- export { e as ACCEPT_DISCLOSURES_WIDGET_LABELS_EN, V as ACCOUNT_DELETE_DIALOG_LABELS_EN, H as ACCOUNT_FORM_SHEET_LABELS_EN, ee as ADDITIONAL_OWNERS_LABELS_EN, b as AcceptDisclosuresWidget, K as AccountDeleteDialog, G as AccountFormSheet, P as BALANCES_WIDGET_LABELS_EN, te as BUSINESS_DETAILS_LABELS_EN, F as BalancesWidget, ie as BankAccountOnboardingWidget, x as BankAccountsWidget, C as BillPayWidget, U as CHART_OF_ACCOUNTS_LABELS_EN, B as CHART_OF_ACCOUNTS_MESSAGE_LABELS_EN, E as CREATE_CARD_FEATURE_LABELS_EN, w as CardDetailsWidget, T as CardFormatValue, k as CardsWidget, W as ChartOfAccountsTable, q as ChartOfAccountsWidget, S as CounterpartsWidget, O as CreateCardWidget, A as ExpenseApprovalPoliciesWidget, N as ExpenseManagementWidget, j as ExpenseRequirementsWidget, Y as HELP_FAQ_EN, J as HELP_WIDGET_LABELS_EN, X as HelpWidget, I as INSIGHTS_FEATURE_LABELS_EN, L as INSIGHTS_WIDGET_LABELS_EN, n as Implementation, z as InsightsWidget, Z as InvoicingWidget, $ as LinkedAccountsWidget, ne as PERSONAL_DETAILS_LABELS_EN, ae as ProductsWidget, oe as ProfileWidget, re as RESULT_LABELS_EN, se as ReceiptMatchWidget, Q as ReceivablesWidget, m as RefreshingRootWidgetProvider, d as RootWidgetProvider, R as SINGLE_INSIGHT_LABELS_EN, ue as SettingsWidget, de as TRANSFERS_FEATURE_LABELS_EN, fe as TRANSFERS_WIDGET_LABELS_EN, ce as TagsWidget, le as TeamWidget, pe as TransfersWidget, c as UIFramework, M as UploadReceiptWidget, me as WidgetProvider, f as WidgetTokenRefreshProvider, t as cloneEmbeddedClient, r as getGlobalWidgetConfig, o as getGlobalWidgetInitState, l as registerDesignSystemEnsurer, u as registerUIRenderers, D as resolveCreateCardFeatureLabels, i as setGlobalWidgetConfig, s as subscribeToGlobalWidgetInitState, a as updateGlobalWidgetConfig, h as useOwnWidgetConfig, g as useRefetchWidget, _ as useWidgetConfig, v as useWidgetError, y as useWidgetLoading, p as useWidgetToken };
87
+ export { e as ACCEPT_DISCLOSURES_WIDGET_LABELS_EN, V as ACCOUNT_DELETE_DIALOG_LABELS_EN, H as ACCOUNT_FORM_SHEET_LABELS_EN, ee as ADDITIONAL_OWNERS_LABELS_EN, b as AcceptDisclosuresWidget, K as AccountDeleteDialog, G as AccountFormSheet, P as BALANCES_WIDGET_LABELS_EN, te as BUSINESS_DETAILS_LABELS_EN, F as BalancesWidget, ie as BankAccountOnboardingWidget, x as BankAccountsWidget, C as BillPayWidget, U as CHART_OF_ACCOUNTS_LABELS_EN, B as CHART_OF_ACCOUNTS_MESSAGE_LABELS_EN, E as CREATE_CARD_FEATURE_LABELS_EN, w as CardDetailsWidget, T as CardFormatValue, k as CardsWidget, W as ChartOfAccountsTable, q as ChartOfAccountsWidget, S as CounterpartsWidget, O as CreateCardWidget, A as ExpenseApprovalPoliciesWidget, N as ExpenseManagementWidget, j as ExpenseRequirementsWidget, Y as HELP_FAQ_EN, J as HELP_WIDGET_LABELS_EN, X as HelpWidget, I as INSIGHTS_FEATURE_LABELS_EN, L as INSIGHTS_WIDGET_LABELS_EN, n as Implementation, z as InsightsWidget, Z as InvoicingWidget, $ as LinkedAccountsWidget, ne as PERSONAL_DETAILS_LABELS_EN, ae as ProductsWidget, oe as ProfileWidget, re as RESULT_LABELS_EN, se as ReceiptMatchWidget, Q as ReceivablesWidget, m as RefreshingRootWidgetProvider, d as RootWidgetProvider, R as SINGLE_INSIGHT_LABELS_EN, ce as SettingsSection, de as SettingsWidget, fe as TRANSFERS_FEATURE_LABELS_EN, pe as TRANSFERS_WIDGET_LABELS_EN, le as TagsWidget, ue as TeamWidget, me as TransfersWidget, c as UIFramework, M as UploadReceiptWidget, he as WidgetProvider, f as WidgetTokenRefreshProvider, t as cloneEmbeddedClient, r as getGlobalWidgetConfig, o as getGlobalWidgetInitState, l as registerDesignSystemEnsurer, u as registerUIRenderers, D as resolveCreateCardFeatureLabels, i as setGlobalWidgetConfig, s as subscribeToGlobalWidgetInitState, a as updateGlobalWidgetConfig, h as useOwnWidgetConfig, g as useRefetchWidget, _ as useWidgetConfig, v as useWidgetError, y as useWidgetLoading, p as useWidgetToken };
@@ -5,6 +5,14 @@ import { FallbackProps } from 'react-error-boundary';
5
5
  interface Labels {
6
6
  loadingLabel: string;
7
7
  errorLabel: string;
8
+ /**
9
+ * Lead-in for the contact line, rendered as
10
+ * `{contactPrefix} {bankName} {link}.` when both a bank name and a contact
11
+ * URL are available.
12
+ */
13
+ contactPrefix: string;
14
+ /** Text of the contact link (wraps the contact URL). */
15
+ contactLinkText: string;
8
16
  }
9
17
 
10
18
  type AuthToken = string | undefined;
@@ -588,6 +596,14 @@ interface FeatureLabels {
588
596
  interface ProfileWidgetProps extends WidgetProviderProps {
589
597
  labels?: Partial<Labels>;
590
598
  featureLabels?: Partial<FeatureLabels>;
599
+ /**
600
+ * Where the "to change this information, contact your bank" line links (a
601
+ * support page URL or a `mailto:`). Left unset, the card shows the plain
602
+ * unlinked sentence instead — the package has no tenant-agnostic support
603
+ * address to fall back on. The bank name in that line comes from widget init,
604
+ * so this is the only value a host needs to supply.
605
+ */
606
+ contactUrl?: string;
591
607
  }
592
608
  declare function ProfileWidget({ baseUrl, widgetToken, organizationId, configClient, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, ...innerProps }: ProfileWidgetProps): React.JSX.Element;
593
609
 
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { ComponentType, AnchorHTMLAttributes, ReactNode, ErrorInfo } from 'react';
2
+ import { ReactNode, ComponentType, AnchorHTMLAttributes, ErrorInfo } from 'react';
3
3
  import { FallbackProps } from 'react-error-boundary';
4
4
 
5
5
  interface Labels {
@@ -7,6 +7,12 @@ interface Labels {
7
7
  description?: string;
8
8
  }
9
9
 
10
+ interface SettingsWidgetSection {
11
+ id: string;
12
+ label: string;
13
+ content: ReactNode;
14
+ }
15
+
10
16
  interface FinopsThemeColors {
11
17
  primary?: string;
12
18
  primaryForeground?: string;
@@ -594,6 +600,46 @@ interface FeatureLabels {
594
600
  expenseRequirementsTab: string;
595
601
  }
596
602
 
603
+ /**
604
+ * The sections this widget renders itself. These ids are the public vocabulary
605
+ * a host uses to deep-link into a section, so they are part of the package's
606
+ * API surface — renaming one is a breaking change.
607
+ */
608
+ declare const SettingsSection: {
609
+ readonly Profile: "profile";
610
+ readonly Team: "team";
611
+ readonly Invoice: "invoice";
612
+ readonly Expense: "expense";
613
+ readonly BillPay: "bill-pay";
614
+ readonly Accounting: "accounting";
615
+ readonly Tags: "tags";
616
+ readonly Help: "help";
617
+ };
618
+ type SettingsSection = (typeof SettingsSection)[keyof typeof SettingsSection];
619
+ /**
620
+ * A selectable section id: one of the built-ins, or the id of a host-supplied
621
+ * {@link SettingsWidgetAdditionalSection}. The `string & {}` arm keeps the
622
+ * built-in literals visible to editor autocomplete while still accepting a
623
+ * host's own id.
624
+ */
625
+ type SettingsWidgetSectionId = SettingsSection | (string & {});
626
+ /**
627
+ * A section contributed by the host, rendered alongside the built-in ones.
628
+ *
629
+ * This exists for surfaces the published package cannot own — the white-label
630
+ * dashboard's password management, for instance, which is an app-auth concern
631
+ * rather than an embedded one. Prefer the `*Content` props when replacing the
632
+ * content of a section that already exists.
633
+ */
634
+ interface SettingsWidgetAdditionalSection extends SettingsWidgetSection {
635
+ /**
636
+ * Place this section immediately after the named built-in one. Sections with
637
+ * no `after` — and those whose anchor is hidden by scope gating — are
638
+ * appended to the end of the list.
639
+ */
640
+ after?: SettingsSection;
641
+ }
642
+
597
643
  interface SettingsWidgetProps extends MoniteRegionProviderProps {
598
644
  labels?: Partial<Labels>;
599
645
  featureLabels?: Partial<FeatureLabels>;
@@ -609,6 +655,22 @@ interface SettingsWidgetProps extends MoniteRegionProviderProps {
609
655
  * support address to fall back on. The bank name in that line comes from
610
656
  * widget init, so this is the only value a host needs to supply. */
611
657
  helpContactUrl?: string;
658
+ /** Forwarded to the embedded Profile section's {@link ProfileWidget} — where
659
+ * its "to change this information, contact your bank" line links. The line
660
+ * falls back to a plain, unlinked sentence when unset, for the same reason
661
+ * {@link SettingsWidgetProps.helpContactUrl} does. */
662
+ profileContactUrl?: string;
663
+ /** The section to show. Leave unset to let the widget own the selection;
664
+ * supply it (with {@link SettingsWidgetProps.onSelectedSectionChange}) to
665
+ * drive navigation from a route, a search param, or host state. A section
666
+ * hidden by the user's scopes falls back to the first visible one. */
667
+ selectedSection?: SettingsWidgetSectionId;
668
+ /** Called with the id of the section the user selected. Fires whether or not
669
+ * {@link SettingsWidgetProps.selectedSection} is supplied, so a host can mirror
670
+ * the selection into its URL without taking ownership of it. */
671
+ onSelectedSectionChange?: (section: SettingsWidgetSectionId) => void;
672
+ /** Host-owned sections rendered alongside the built-in ones. */
673
+ additionalSections?: SettingsWidgetAdditionalSection[];
612
674
  profileContent?: ReactNode;
613
675
  teamContent?: ReactNode;
614
676
  billPayContent?: ReactNode;
@@ -620,5 +682,5 @@ interface SettingsWidgetProps extends MoniteRegionProviderProps {
620
682
  }
621
683
  declare function SettingsWidget({ baseUrl, widgetToken, organizationId, configClient, linkComponent, implementation, uiFramework, errorFallback, onError, finopsThemeColors, analytics, ...innerProps }: SettingsWidgetProps): React.JSX.Element;
622
684
 
623
- export { SettingsWidget };
624
- export type { FeatureLabels as SettingsWidgetFeatureLabels, Labels as SettingsWidgetLabels, SettingsWidgetProps };
685
+ export { SettingsSection, SettingsWidget };
686
+ export type { SettingsWidgetAdditionalSection, FeatureLabels as SettingsWidgetFeatureLabels, Labels as SettingsWidgetLabels, SettingsWidgetProps, SettingsWidgetSection, SettingsWidgetSectionId };
@@ -1,3 +1,4 @@
1
- import { SettingsWidget as e } from "../libs/tesouro-embedded-components-react/settings-widget/feature/dist/index5.js";
1
+ import { SettingsSection as e } from "../libs/tesouro-embedded-components-react/settings-widget/feature/dist/index4.js";
2
+ import { SettingsWidget as t } from "../libs/tesouro-embedded-components-react/settings-widget/feature/dist/index6.js";
2
3
  import "../libs/tesouro-embedded-components-react/settings-widget/feature/dist/index.js";
3
- export { e as SettingsWidget };
4
+ export { e as SettingsSection, t as SettingsWidget };