@tesouro/embedded-components-react 0.3.26 → 0.3.27

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.
Files changed (63) hide show
  1. package/README.md +3 -0
  2. package/dist/experimental/WidgetSuite.d.ts +32 -3
  3. package/dist/experimental/index.d.ts +32 -3
  4. package/dist/index.d.ts +60 -25
  5. package/dist/lib/AcceptDisclosuresWidget.d.ts +32 -3
  6. package/dist/lib/BalancesWidget.d.ts +31 -2
  7. package/dist/lib/BankAccountOnboardingWidget.d.ts +32 -3
  8. package/dist/lib/BankAccountsWidget.d.ts +32 -3
  9. package/dist/lib/BillPayWidget.d.ts +31 -2
  10. package/dist/lib/CardDetailsWidget.d.ts +32 -3
  11. package/dist/lib/CardsWidget.d.ts +32 -3
  12. package/dist/lib/ChartOfAccountsWidget.d.ts +32 -3
  13. package/dist/lib/CounterpartsWidget.d.ts +32 -3
  14. package/dist/lib/CreateCardWidget.d.ts +32 -3
  15. package/dist/lib/ExpenseApprovalPoliciesWidget.d.ts +32 -3
  16. package/dist/lib/ExpenseManagementWidget.d.ts +32 -3
  17. package/dist/lib/ExpenseRequirementsWidget.d.ts +32 -3
  18. package/dist/lib/HelpWidget.d.ts +32 -3
  19. package/dist/lib/InsightsWidget.d.ts +31 -2
  20. package/dist/lib/InvoicingWidget.d.ts +32 -3
  21. package/dist/lib/LinkedAccountsWidget.d.ts +32 -3
  22. package/dist/lib/ProductsWidget.d.ts +32 -3
  23. package/dist/lib/ProfileWidget.d.ts +32 -3
  24. package/dist/lib/ReceiptMatchWidget.d.ts +32 -3
  25. package/dist/lib/ReceivablesWidget.d.ts +32 -3
  26. package/dist/lib/SettingsWidget.d.ts +32 -3
  27. package/dist/lib/TagsWidget.d.ts +32 -3
  28. package/dist/lib/TeamWidget.d.ts +32 -3
  29. package/dist/lib/TransfersWidget.d.ts +31 -2
  30. package/dist/lib/WidgetProvider.d.ts +39 -4
  31. package/dist/lib/WidgetProviderPublic.d.ts +31 -2
  32. package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/index5.js +3 -2
  33. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index18.js +131 -130
  34. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/index8.js +3 -2
  35. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +4 -3
  36. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index73.js +3 -2
  37. package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index6.js +3 -2
  38. package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index9.js +3 -2
  39. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/index8.js +3 -2
  40. package/dist/libs/tesouro-embedded-components-react/create-card-widget/feature/dist/index7.js +88 -87
  41. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index13.js +7 -6
  42. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index6.js +2 -1
  43. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index9.js +3 -2
  44. package/dist/libs/tesouro-embedded-components-react/expense-requirements-widget/feature/dist/lib/ExpenseRequirementsWidget.js +2 -1
  45. package/dist/libs/tesouro-embedded-components-react/gl-code-table-widget/feature/dist/index8.js +5 -4
  46. package/dist/libs/tesouro-embedded-components-react/help-widget/feature/dist/index3.js +3 -2
  47. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index12.js +3 -2
  48. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index3.js +5 -4
  49. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/index9.js +3 -2
  50. package/dist/libs/tesouro-embedded-components-react/products-widget/feature/dist/index8.js +3 -2
  51. package/dist/libs/tesouro-embedded-components-react/profile-widget/feature/dist/index4.js +3 -2
  52. package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index6.js +3 -2
  53. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/RootWidgetProvider.js +50 -48
  54. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/WidgetErrorBoundary.js +13 -13
  55. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/WidgetProvider.js +174 -163
  56. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/isDisclosuresAcceptanceRequired.js +12 -1
  57. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/labels.js +7 -1
  58. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  59. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/events.js +1 -0
  60. package/dist/libs/tesouro-embedded-components-react/tags-widget/feature/dist/index11.js +3 -2
  61. package/dist/libs/tesouro-embedded-components-react/team-widget/feature/dist/index17.js +3 -2
  62. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index8.js +3 -2
  63. package/package.json +1 -1
@@ -604,6 +604,26 @@ interface WidgetProviderBaseProps extends WidgetConfigInput {
604
604
  analytics?: boolean;
605
605
  }
606
606
 
607
+ /**
608
+ * Copy for the states `WidgetProvider` renders *itself*, in place of the widget:
609
+ * the error-boundary fallback and the disclosures gate. A host overrides any
610
+ * subset through the `providerLabels` prop, which cascades like
611
+ * `disclosuresAcceptance`.
612
+ *
613
+ * Not named `Labels` on the public surface: a widget's own `labels` prop is a
614
+ * different thing, and these two travel together on every widget's props type.
615
+ */
616
+ interface WidgetProviderLabels {
617
+ /** Default copy for the built-in error boundary fallback. */
618
+ errorBoundaryFallback: string;
619
+ /** Heading when init reports disclosures are required and not yet accepted. */
620
+ disclosuresRequiredTitle: string;
621
+ /** Heading while a token-only refresh leaves init stale for the live token. */
622
+ disclosuresRefreshingTitle: string;
623
+ /** Supporting copy while the accept action is withheld for a stale init. */
624
+ disclosuresRefreshingDescription: string;
625
+ }
626
+
607
627
  /**
608
628
  * Props for {@link WidgetProvider}.
609
629
  *
@@ -616,8 +636,8 @@ interface WidgetProviderProps extends WidgetProviderBaseProps {
616
636
  * Fallback rendered when a render-time exception is caught inside this
617
637
  * provider's subtree. Pass either a `ReactNode` (rendered directly) or a
618
638
  * render-prop receiving `{ error, resetErrorBoundary }` from
619
- * `react-error-boundary`. Default is a plain `role="alert"` div with
620
- * generic copy from `DEFAULT_LABELS.errorBoundaryFallback`.
639
+ * `react-error-boundary`. Default is a plain `role="alert"` div whose copy
640
+ * comes from `providerLabels.errorBoundaryFallback`.
621
641
  */
622
642
  errorFallback?: ReactNode | ((props: FallbackProps) => ReactNode);
623
643
  /**
@@ -634,6 +654,15 @@ interface WidgetProviderProps extends WidgetProviderBaseProps {
634
654
  * WidgetProvider cannot import the widget itself (cycle).
635
655
  */
636
656
  disclosuresAcceptance?: ReactNode;
657
+ /**
658
+ * Overrides for the copy this provider renders in place of the widget: the
659
+ * built-in error-boundary fallback and the disclosures gate. Any subset;
660
+ * unlisted keys keep their defaults. Cascades like `linkComponent`.
661
+ *
662
+ * Named `providerLabels` rather than `labels` because a widget's own
663
+ * `labels` prop sits alongside this one on the same props type.
664
+ */
665
+ providerLabels?: Partial<WidgetProviderLabels>;
637
666
  }
638
667
 
639
668
  interface Labels {
@@ -732,7 +761,7 @@ interface BankAccountsWidgetProps extends WidgetProviderProps {
732
761
  /** Called when the user opens account details or goes back to the list. */
733
762
  onSelectedAccountIdChange?: (accountId: string | null) => void;
734
763
  }
735
- declare function BankAccountsWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, disclosuresAcceptance, ...innerProps }: BankAccountsWidgetProps): React.JSX.Element;
764
+ declare function BankAccountsWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, disclosuresAcceptance, providerLabels, ...innerProps }: BankAccountsWidgetProps): React.JSX.Element;
736
765
 
737
766
  export { BankAccountsWidget };
738
767
  export type { Labels as AccountDetailsWidgetLabels, FeatureLabels as BankAccountsWidgetFeatureLabels, Labels$1 as BankAccountsWidgetLabels, BankAccountsWidgetProps };
@@ -717,6 +717,26 @@ interface WidgetProviderBaseProps extends WidgetConfigInput {
717
717
  analytics?: boolean;
718
718
  }
719
719
 
720
+ /**
721
+ * Copy for the states `WidgetProvider` renders *itself*, in place of the widget:
722
+ * the error-boundary fallback and the disclosures gate. A host overrides any
723
+ * subset through the `providerLabels` prop, which cascades like
724
+ * `disclosuresAcceptance`.
725
+ *
726
+ * Not named `Labels` on the public surface: a widget's own `labels` prop is a
727
+ * different thing, and these two travel together on every widget's props type.
728
+ */
729
+ interface WidgetProviderLabels {
730
+ /** Default copy for the built-in error boundary fallback. */
731
+ errorBoundaryFallback: string;
732
+ /** Heading when init reports disclosures are required and not yet accepted. */
733
+ disclosuresRequiredTitle: string;
734
+ /** Heading while a token-only refresh leaves init stale for the live token. */
735
+ disclosuresRefreshingTitle: string;
736
+ /** Supporting copy while the accept action is withheld for a stale init. */
737
+ disclosuresRefreshingDescription: string;
738
+ }
739
+
720
740
  /**
721
741
  * Props for {@link WidgetProvider}.
722
742
  *
@@ -729,8 +749,8 @@ interface WidgetProviderProps extends WidgetProviderBaseProps {
729
749
  * Fallback rendered when a render-time exception is caught inside this
730
750
  * provider's subtree. Pass either a `ReactNode` (rendered directly) or a
731
751
  * render-prop receiving `{ error, resetErrorBoundary }` from
732
- * `react-error-boundary`. Default is a plain `role="alert"` div with
733
- * generic copy from `DEFAULT_LABELS.errorBoundaryFallback`.
752
+ * `react-error-boundary`. Default is a plain `role="alert"` div whose copy
753
+ * comes from `providerLabels.errorBoundaryFallback`.
734
754
  */
735
755
  errorFallback?: ReactNode | ((props: FallbackProps) => ReactNode);
736
756
  /**
@@ -747,6 +767,15 @@ interface WidgetProviderProps extends WidgetProviderBaseProps {
747
767
  * WidgetProvider cannot import the widget itself (cycle).
748
768
  */
749
769
  disclosuresAcceptance?: ReactNode;
770
+ /**
771
+ * Overrides for the copy this provider renders in place of the widget: the
772
+ * built-in error-boundary fallback and the disclosures gate. Any subset;
773
+ * unlisted keys keep their defaults. Cascades like `linkComponent`.
774
+ *
775
+ * Named `providerLabels` rather than `labels` because a widget's own
776
+ * `labels` prop sits alongside this one on the same props type.
777
+ */
778
+ providerLabels?: Partial<WidgetProviderLabels>;
750
779
  }
751
780
 
752
781
  type MoniteRegionProviderProps = WidgetProviderProps & MoniteWrapperProps;
@@ -636,6 +636,26 @@ interface WidgetProviderBaseProps extends WidgetConfigInput {
636
636
  analytics?: boolean;
637
637
  }
638
638
 
639
+ /**
640
+ * Copy for the states `WidgetProvider` renders *itself*, in place of the widget:
641
+ * the error-boundary fallback and the disclosures gate. A host overrides any
642
+ * subset through the `providerLabels` prop, which cascades like
643
+ * `disclosuresAcceptance`.
644
+ *
645
+ * Not named `Labels` on the public surface: a widget's own `labels` prop is a
646
+ * different thing, and these two travel together on every widget's props type.
647
+ */
648
+ interface WidgetProviderLabels {
649
+ /** Default copy for the built-in error boundary fallback. */
650
+ errorBoundaryFallback: string;
651
+ /** Heading when init reports disclosures are required and not yet accepted. */
652
+ disclosuresRequiredTitle: string;
653
+ /** Heading while a token-only refresh leaves init stale for the live token. */
654
+ disclosuresRefreshingTitle: string;
655
+ /** Supporting copy while the accept action is withheld for a stale init. */
656
+ disclosuresRefreshingDescription: string;
657
+ }
658
+
639
659
  /**
640
660
  * Props for {@link WidgetProvider}.
641
661
  *
@@ -648,8 +668,8 @@ interface WidgetProviderProps extends WidgetProviderBaseProps {
648
668
  * Fallback rendered when a render-time exception is caught inside this
649
669
  * provider's subtree. Pass either a `ReactNode` (rendered directly) or a
650
670
  * render-prop receiving `{ error, resetErrorBoundary }` from
651
- * `react-error-boundary`. Default is a plain `role="alert"` div with
652
- * generic copy from `DEFAULT_LABELS.errorBoundaryFallback`.
671
+ * `react-error-boundary`. Default is a plain `role="alert"` div whose copy
672
+ * comes from `providerLabels.errorBoundaryFallback`.
653
673
  */
654
674
  errorFallback?: ReactNode | ((props: FallbackProps) => ReactNode);
655
675
  /**
@@ -666,6 +686,15 @@ interface WidgetProviderProps extends WidgetProviderBaseProps {
666
686
  * WidgetProvider cannot import the widget itself (cycle).
667
687
  */
668
688
  disclosuresAcceptance?: ReactNode;
689
+ /**
690
+ * Overrides for the copy this provider renders in place of the widget: the
691
+ * built-in error-boundary fallback and the disclosures gate. Any subset;
692
+ * unlisted keys keep their defaults. Cascades like `linkComponent`.
693
+ *
694
+ * Named `providerLabels` rather than `labels` because a widget's own
695
+ * `labels` prop sits alongside this one on the same props type.
696
+ */
697
+ providerLabels?: Partial<WidgetProviderLabels>;
669
698
  }
670
699
 
671
700
  /**
@@ -801,7 +830,7 @@ interface CardDetailsWidgetProps extends WidgetProviderProps {
801
830
  * Both placements are covered by specs, because they take different code paths
802
831
  * through the provider and this export exists for the standalone one.
803
832
  */
804
- declare function CardDetailsWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, disclosuresAcceptance, ...innerProps }: CardDetailsWidgetProps): React.JSX.Element;
833
+ declare function CardDetailsWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, disclosuresAcceptance, providerLabels, ...innerProps }: CardDetailsWidgetProps): React.JSX.Element;
805
834
 
806
835
  export { CardDetailsWidget };
807
836
  export type { CardDetailsFeatureLabels, CardDetailsPanelLabels as CardDetailsWidgetLabels, CardDetailsWidgetProps };
@@ -655,6 +655,26 @@ interface WidgetProviderBaseProps extends WidgetConfigInput {
655
655
  analytics?: boolean;
656
656
  }
657
657
 
658
+ /**
659
+ * Copy for the states `WidgetProvider` renders *itself*, in place of the widget:
660
+ * the error-boundary fallback and the disclosures gate. A host overrides any
661
+ * subset through the `providerLabels` prop, which cascades like
662
+ * `disclosuresAcceptance`.
663
+ *
664
+ * Not named `Labels` on the public surface: a widget's own `labels` prop is a
665
+ * different thing, and these two travel together on every widget's props type.
666
+ */
667
+ interface WidgetProviderLabels {
668
+ /** Default copy for the built-in error boundary fallback. */
669
+ errorBoundaryFallback: string;
670
+ /** Heading when init reports disclosures are required and not yet accepted. */
671
+ disclosuresRequiredTitle: string;
672
+ /** Heading while a token-only refresh leaves init stale for the live token. */
673
+ disclosuresRefreshingTitle: string;
674
+ /** Supporting copy while the accept action is withheld for a stale init. */
675
+ disclosuresRefreshingDescription: string;
676
+ }
677
+
658
678
  /**
659
679
  * Props for {@link WidgetProvider}.
660
680
  *
@@ -667,8 +687,8 @@ interface WidgetProviderProps extends WidgetProviderBaseProps {
667
687
  * Fallback rendered when a render-time exception is caught inside this
668
688
  * provider's subtree. Pass either a `ReactNode` (rendered directly) or a
669
689
  * render-prop receiving `{ error, resetErrorBoundary }` from
670
- * `react-error-boundary`. Default is a plain `role="alert"` div with
671
- * generic copy from `DEFAULT_LABELS.errorBoundaryFallback`.
690
+ * `react-error-boundary`. Default is a plain `role="alert"` div whose copy
691
+ * comes from `providerLabels.errorBoundaryFallback`.
672
692
  */
673
693
  errorFallback?: ReactNode | ((props: FallbackProps) => ReactNode);
674
694
  /**
@@ -685,6 +705,15 @@ interface WidgetProviderProps extends WidgetProviderBaseProps {
685
705
  * WidgetProvider cannot import the widget itself (cycle).
686
706
  */
687
707
  disclosuresAcceptance?: ReactNode;
708
+ /**
709
+ * Overrides for the copy this provider renders in place of the widget: the
710
+ * built-in error-boundary fallback and the disclosures gate. Any subset;
711
+ * unlisted keys keep their defaults. Cascades like `linkComponent`.
712
+ *
713
+ * Named `providerLabels` rather than `labels` because a widget's own
714
+ * `labels` prop sits alongside this one on the same props type.
715
+ */
716
+ providerLabels?: Partial<WidgetProviderLabels>;
688
717
  }
689
718
 
690
719
  /**
@@ -1222,7 +1251,7 @@ interface CardsWidgetProps extends WidgetProviderProps {
1222
1251
  * inside `WidgetProvider`'s subtree, which is what the data-access hooks read
1223
1252
  * their client, org and token from.
1224
1253
  */
1225
- declare function CardsWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, disclosuresAcceptance, ...innerProps }: CardsWidgetProps): React.JSX.Element;
1254
+ declare function CardsWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, disclosuresAcceptance, providerLabels, ...innerProps }: CardsWidgetProps): React.JSX.Element;
1226
1255
 
1227
1256
  export { CardsWidget };
1228
1257
  export type { CardsFeatureLabels as CardsWidgetFeatureLabels, CardsListLabels as CardsWidgetLabels, CardsWidgetPagination, CardsWidgetProps };
@@ -809,6 +809,26 @@ interface WidgetProviderBaseProps extends WidgetConfigInput {
809
809
  analytics?: boolean;
810
810
  }
811
811
 
812
+ /**
813
+ * Copy for the states `WidgetProvider` renders *itself*, in place of the widget:
814
+ * the error-boundary fallback and the disclosures gate. A host overrides any
815
+ * subset through the `providerLabels` prop, which cascades like
816
+ * `disclosuresAcceptance`.
817
+ *
818
+ * Not named `Labels` on the public surface: a widget's own `labels` prop is a
819
+ * different thing, and these two travel together on every widget's props type.
820
+ */
821
+ interface WidgetProviderLabels {
822
+ /** Default copy for the built-in error boundary fallback. */
823
+ errorBoundaryFallback: string;
824
+ /** Heading when init reports disclosures are required and not yet accepted. */
825
+ disclosuresRequiredTitle: string;
826
+ /** Heading while a token-only refresh leaves init stale for the live token. */
827
+ disclosuresRefreshingTitle: string;
828
+ /** Supporting copy while the accept action is withheld for a stale init. */
829
+ disclosuresRefreshingDescription: string;
830
+ }
831
+
812
832
  /**
813
833
  * Props for {@link WidgetProvider}.
814
834
  *
@@ -821,8 +841,8 @@ interface WidgetProviderProps extends WidgetProviderBaseProps {
821
841
  * Fallback rendered when a render-time exception is caught inside this
822
842
  * provider's subtree. Pass either a `ReactNode` (rendered directly) or a
823
843
  * render-prop receiving `{ error, resetErrorBoundary }` from
824
- * `react-error-boundary`. Default is a plain `role="alert"` div with
825
- * generic copy from `DEFAULT_LABELS.errorBoundaryFallback`.
844
+ * `react-error-boundary`. Default is a plain `role="alert"` div whose copy
845
+ * comes from `providerLabels.errorBoundaryFallback`.
826
846
  */
827
847
  errorFallback?: ReactNode | ((props: FallbackProps) => ReactNode);
828
848
  /**
@@ -839,6 +859,15 @@ interface WidgetProviderProps extends WidgetProviderBaseProps {
839
859
  * WidgetProvider cannot import the widget itself (cycle).
840
860
  */
841
861
  disclosuresAcceptance?: ReactNode;
862
+ /**
863
+ * Overrides for the copy this provider renders in place of the widget: the
864
+ * built-in error-boundary fallback and the disclosures gate. Any subset;
865
+ * unlisted keys keep their defaults. Cascades like `linkComponent`.
866
+ *
867
+ * Named `providerLabels` rather than `labels` because a widget's own
868
+ * `labels` prop sits alongside this one on the same props type.
869
+ */
870
+ providerLabels?: Partial<WidgetProviderLabels>;
842
871
  }
843
872
 
844
873
  /**
@@ -923,7 +952,7 @@ type ChartOfAccountsWidgetProps = WidgetProviderProps & TableProps & ChartOfAcco
923
952
  * />
924
953
  * ```
925
954
  */
926
- declare function ChartOfAccountsWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, analytics, disclosuresAcceptance, errorFallback, onError, ...tableProps }: ChartOfAccountsWidgetProps): React.JSX.Element;
955
+ declare function ChartOfAccountsWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, analytics, disclosuresAcceptance, providerLabels, errorFallback, onError, ...tableProps }: ChartOfAccountsWidgetProps): React.JSX.Element;
927
956
 
928
957
  export { ACCOUNT_DELETE_DIALOG_LABELS_EN, ACCOUNT_FORM_SHEET_LABELS_EN, AccountDeleteDialog, AccountFormSheet, CHART_OF_ACCOUNTS_LABELS_EN, CHART_OF_ACCOUNTS_MESSAGE_LABELS_EN, ChartOfAccountsTable, ChartOfAccountsWidget };
929
958
  export type { AccountDeleteDialogLabels, AccountDeleteDialogProps, AccountFormErrors, AccountFormMode, AccountFormSheetLabels, AccountFormSheetProps, AccountFormValues, ChartOfAccountsLabels, ChartOfAccountsMessageLabels, ChartOfAccountsTableProps, ChartOfAccountsWidgetLabelProps, ChartOfAccountsWidgetProps, LedgerAccountRow };
@@ -566,6 +566,26 @@ interface WidgetProviderBaseProps extends WidgetConfigInput {
566
566
  analytics?: boolean;
567
567
  }
568
568
 
569
+ /**
570
+ * Copy for the states `WidgetProvider` renders *itself*, in place of the widget:
571
+ * the error-boundary fallback and the disclosures gate. A host overrides any
572
+ * subset through the `providerLabels` prop, which cascades like
573
+ * `disclosuresAcceptance`.
574
+ *
575
+ * Not named `Labels` on the public surface: a widget's own `labels` prop is a
576
+ * different thing, and these two travel together on every widget's props type.
577
+ */
578
+ interface WidgetProviderLabels {
579
+ /** Default copy for the built-in error boundary fallback. */
580
+ errorBoundaryFallback: string;
581
+ /** Heading when init reports disclosures are required and not yet accepted. */
582
+ disclosuresRequiredTitle: string;
583
+ /** Heading while a token-only refresh leaves init stale for the live token. */
584
+ disclosuresRefreshingTitle: string;
585
+ /** Supporting copy while the accept action is withheld for a stale init. */
586
+ disclosuresRefreshingDescription: string;
587
+ }
588
+
569
589
  /**
570
590
  * Props for {@link WidgetProvider}.
571
591
  *
@@ -578,8 +598,8 @@ interface WidgetProviderProps extends WidgetProviderBaseProps {
578
598
  * Fallback rendered when a render-time exception is caught inside this
579
599
  * provider's subtree. Pass either a `ReactNode` (rendered directly) or a
580
600
  * render-prop receiving `{ error, resetErrorBoundary }` from
581
- * `react-error-boundary`. Default is a plain `role="alert"` div with
582
- * generic copy from `DEFAULT_LABELS.errorBoundaryFallback`.
601
+ * `react-error-boundary`. Default is a plain `role="alert"` div whose copy
602
+ * comes from `providerLabels.errorBoundaryFallback`.
583
603
  */
584
604
  errorFallback?: ReactNode | ((props: FallbackProps) => ReactNode);
585
605
  /**
@@ -596,6 +616,15 @@ interface WidgetProviderProps extends WidgetProviderBaseProps {
596
616
  * WidgetProvider cannot import the widget itself (cycle).
597
617
  */
598
618
  disclosuresAcceptance?: ReactNode;
619
+ /**
620
+ * Overrides for the copy this provider renders in place of the widget: the
621
+ * built-in error-boundary fallback and the disclosures gate. Any subset;
622
+ * unlisted keys keep their defaults. Cascades like `linkComponent`.
623
+ *
624
+ * Named `providerLabels` rather than `labels` because a widget's own
625
+ * `labels` prop sits alongside this one on the same props type.
626
+ */
627
+ providerLabels?: Partial<WidgetProviderLabels>;
599
628
  }
600
629
 
601
630
  interface AddressFieldGroupLabels {
@@ -878,7 +907,7 @@ type CounterpartsWidgetProps = WidgetProviderProps & CounterpartsWidgetOwnProps;
878
907
  * />
879
908
  * ```
880
909
  */
881
- declare function CounterpartsWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, disclosuresAcceptance, ...innerProps }: CounterpartsWidgetProps): React.JSX.Element;
910
+ declare function CounterpartsWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, disclosuresAcceptance, providerLabels, ...innerProps }: CounterpartsWidgetProps): React.JSX.Element;
882
911
 
883
912
  export { CounterpartsWidget };
884
913
  export type { AddressFormSheetLabels, BankAccountFormSheetLabels, ConfirmDeleteDialogLabels, CounterpartDetailsSheetLabels, CounterpartFormSheetLabels, CounterpartMessageLabels, CounterpartMode, CounterpartsScreenLabels, CounterpartsWidgetProps };
@@ -654,6 +654,26 @@ interface WidgetProviderBaseProps extends WidgetConfigInput {
654
654
  analytics?: boolean;
655
655
  }
656
656
 
657
+ /**
658
+ * Copy for the states `WidgetProvider` renders *itself*, in place of the widget:
659
+ * the error-boundary fallback and the disclosures gate. A host overrides any
660
+ * subset through the `providerLabels` prop, which cascades like
661
+ * `disclosuresAcceptance`.
662
+ *
663
+ * Not named `Labels` on the public surface: a widget's own `labels` prop is a
664
+ * different thing, and these two travel together on every widget's props type.
665
+ */
666
+ interface WidgetProviderLabels {
667
+ /** Default copy for the built-in error boundary fallback. */
668
+ errorBoundaryFallback: string;
669
+ /** Heading when init reports disclosures are required and not yet accepted. */
670
+ disclosuresRequiredTitle: string;
671
+ /** Heading while a token-only refresh leaves init stale for the live token. */
672
+ disclosuresRefreshingTitle: string;
673
+ /** Supporting copy while the accept action is withheld for a stale init. */
674
+ disclosuresRefreshingDescription: string;
675
+ }
676
+
657
677
  /**
658
678
  * Props for {@link WidgetProvider}.
659
679
  *
@@ -666,8 +686,8 @@ interface WidgetProviderProps extends WidgetProviderBaseProps {
666
686
  * Fallback rendered when a render-time exception is caught inside this
667
687
  * provider's subtree. Pass either a `ReactNode` (rendered directly) or a
668
688
  * render-prop receiving `{ error, resetErrorBoundary }` from
669
- * `react-error-boundary`. Default is a plain `role="alert"` div with
670
- * generic copy from `DEFAULT_LABELS.errorBoundaryFallback`.
689
+ * `react-error-boundary`. Default is a plain `role="alert"` div whose copy
690
+ * comes from `providerLabels.errorBoundaryFallback`.
671
691
  */
672
692
  errorFallback?: ReactNode | ((props: FallbackProps) => ReactNode);
673
693
  /**
@@ -684,6 +704,15 @@ interface WidgetProviderProps extends WidgetProviderBaseProps {
684
704
  * WidgetProvider cannot import the widget itself (cycle).
685
705
  */
686
706
  disclosuresAcceptance?: ReactNode;
707
+ /**
708
+ * Overrides for the copy this provider renders in place of the widget: the
709
+ * built-in error-boundary fallback and the disclosures gate. Any subset;
710
+ * unlisted keys keep their defaults. Cascades like `linkComponent`.
711
+ *
712
+ * Named `providerLabels` rather than `labels` because a widget's own
713
+ * `labels` prop sits alongside this one on the same props type.
714
+ */
715
+ providerLabels?: Partial<WidgetProviderLabels>;
687
716
  }
688
717
 
689
718
  interface CreateCardFeatureLabels {
@@ -743,7 +772,7 @@ type CreateCardWidgetProps = WidgetProviderProps & {
743
772
  * Self-contained Create Card widget. Issues a debit card via the Embed API and
744
773
  * drives setup → preparing → success with sonner toasts for the mutation.
745
774
  */
746
- declare function CreateCardWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, disclosuresAcceptance, ...innerProps }: CreateCardWidgetProps): React.JSX.Element;
775
+ declare function CreateCardWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, disclosuresAcceptance, providerLabels, ...innerProps }: CreateCardWidgetProps): React.JSX.Element;
747
776
 
748
777
  /** Opaque UI format values — mapped to API `DebitCardType` in the feature. */
749
778
  declare const CardFormatValue: {
@@ -566,6 +566,26 @@ interface WidgetProviderBaseProps extends WidgetConfigInput {
566
566
  analytics?: boolean;
567
567
  }
568
568
 
569
+ /**
570
+ * Copy for the states `WidgetProvider` renders *itself*, in place of the widget:
571
+ * the error-boundary fallback and the disclosures gate. A host overrides any
572
+ * subset through the `providerLabels` prop, which cascades like
573
+ * `disclosuresAcceptance`.
574
+ *
575
+ * Not named `Labels` on the public surface: a widget's own `labels` prop is a
576
+ * different thing, and these two travel together on every widget's props type.
577
+ */
578
+ interface WidgetProviderLabels {
579
+ /** Default copy for the built-in error boundary fallback. */
580
+ errorBoundaryFallback: string;
581
+ /** Heading when init reports disclosures are required and not yet accepted. */
582
+ disclosuresRequiredTitle: string;
583
+ /** Heading while a token-only refresh leaves init stale for the live token. */
584
+ disclosuresRefreshingTitle: string;
585
+ /** Supporting copy while the accept action is withheld for a stale init. */
586
+ disclosuresRefreshingDescription: string;
587
+ }
588
+
569
589
  /**
570
590
  * Props for {@link WidgetProvider}.
571
591
  *
@@ -578,8 +598,8 @@ interface WidgetProviderProps extends WidgetProviderBaseProps {
578
598
  * Fallback rendered when a render-time exception is caught inside this
579
599
  * provider's subtree. Pass either a `ReactNode` (rendered directly) or a
580
600
  * render-prop receiving `{ error, resetErrorBoundary }` from
581
- * `react-error-boundary`. Default is a plain `role="alert"` div with
582
- * generic copy from `DEFAULT_LABELS.errorBoundaryFallback`.
601
+ * `react-error-boundary`. Default is a plain `role="alert"` div whose copy
602
+ * comes from `providerLabels.errorBoundaryFallback`.
583
603
  */
584
604
  errorFallback?: ReactNode | ((props: FallbackProps) => ReactNode);
585
605
  /**
@@ -596,6 +616,15 @@ interface WidgetProviderProps extends WidgetProviderBaseProps {
596
616
  * WidgetProvider cannot import the widget itself (cycle).
597
617
  */
598
618
  disclosuresAcceptance?: ReactNode;
619
+ /**
620
+ * Overrides for the copy this provider renders in place of the widget: the
621
+ * built-in error-boundary fallback and the disclosures gate. Any subset;
622
+ * unlisted keys keep their defaults. Cascades like `linkComponent`.
623
+ *
624
+ * Named `providerLabels` rather than `labels` because a widget's own
625
+ * `labels` prop sits alongside this one on the same props type.
626
+ */
627
+ providerLabels?: Partial<WidgetProviderLabels>;
599
628
  }
600
629
 
601
630
  type ExpenseApprovalPoliciesWidgetProps = WidgetProviderProps & {
@@ -604,7 +633,7 @@ type ExpenseApprovalPoliciesWidgetProps = WidgetProviderProps & {
604
633
  /** @deprecated Use `organizationId` instead */
605
634
  orgId?: string | null;
606
635
  };
607
- declare function ExpenseApprovalPoliciesWidget({ token, orgId, widgetToken, organizationId, baseUrl, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, disclosuresAcceptance, }?: ExpenseApprovalPoliciesWidgetProps): React.JSX.Element;
636
+ declare function ExpenseApprovalPoliciesWidget({ token, orgId, widgetToken, organizationId, baseUrl, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, disclosuresAcceptance, providerLabels, }?: ExpenseApprovalPoliciesWidgetProps): React.JSX.Element;
608
637
 
609
638
  export { ExpenseApprovalPoliciesWidget };
610
639
  export type { ExpenseApprovalPoliciesWidgetProps };
@@ -574,6 +574,26 @@ interface WidgetProviderBaseProps extends WidgetConfigInput {
574
574
  analytics?: boolean;
575
575
  }
576
576
 
577
+ /**
578
+ * Copy for the states `WidgetProvider` renders *itself*, in place of the widget:
579
+ * the error-boundary fallback and the disclosures gate. A host overrides any
580
+ * subset through the `providerLabels` prop, which cascades like
581
+ * `disclosuresAcceptance`.
582
+ *
583
+ * Not named `Labels` on the public surface: a widget's own `labels` prop is a
584
+ * different thing, and these two travel together on every widget's props type.
585
+ */
586
+ interface WidgetProviderLabels {
587
+ /** Default copy for the built-in error boundary fallback. */
588
+ errorBoundaryFallback: string;
589
+ /** Heading when init reports disclosures are required and not yet accepted. */
590
+ disclosuresRequiredTitle: string;
591
+ /** Heading while a token-only refresh leaves init stale for the live token. */
592
+ disclosuresRefreshingTitle: string;
593
+ /** Supporting copy while the accept action is withheld for a stale init. */
594
+ disclosuresRefreshingDescription: string;
595
+ }
596
+
577
597
  /**
578
598
  * Props for {@link WidgetProvider}.
579
599
  *
@@ -586,8 +606,8 @@ interface WidgetProviderProps extends WidgetProviderBaseProps {
586
606
  * Fallback rendered when a render-time exception is caught inside this
587
607
  * provider's subtree. Pass either a `ReactNode` (rendered directly) or a
588
608
  * render-prop receiving `{ error, resetErrorBoundary }` from
589
- * `react-error-boundary`. Default is a plain `role="alert"` div with
590
- * generic copy from `DEFAULT_LABELS.errorBoundaryFallback`.
609
+ * `react-error-boundary`. Default is a plain `role="alert"` div whose copy
610
+ * comes from `providerLabels.errorBoundaryFallback`.
591
611
  */
592
612
  errorFallback?: ReactNode | ((props: FallbackProps) => ReactNode);
593
613
  /**
@@ -604,6 +624,15 @@ interface WidgetProviderProps extends WidgetProviderBaseProps {
604
624
  * WidgetProvider cannot import the widget itself (cycle).
605
625
  */
606
626
  disclosuresAcceptance?: ReactNode;
627
+ /**
628
+ * Overrides for the copy this provider renders in place of the widget: the
629
+ * built-in error-boundary fallback and the disclosures gate. Any subset;
630
+ * unlisted keys keep their defaults. Cascades like `linkComponent`.
631
+ *
632
+ * Named `providerLabels` rather than `labels` because a widget's own
633
+ * `labels` prop sits alongside this one on the same props type.
634
+ */
635
+ providerLabels?: Partial<WidgetProviderLabels>;
607
636
  }
608
637
 
609
638
  /**
@@ -638,7 +667,7 @@ interface ExpenseManagementWidgetProps extends WidgetProviderProps {
638
667
  policiesContent?: ReactNode;
639
668
  requirementsContent?: ReactNode;
640
669
  }
641
- declare function ExpenseManagementWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, disclosuresAcceptance, ...innerProps }: ExpenseManagementWidgetProps): React.JSX.Element;
670
+ declare function ExpenseManagementWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, disclosuresAcceptance, providerLabels, ...innerProps }: ExpenseManagementWidgetProps): React.JSX.Element;
642
671
 
643
672
  export { ExpenseManagementWidget };
644
673
  export type { Labels as ExpenseManagementWidgetLabels, ExpenseManagementWidgetProps };
@@ -566,6 +566,26 @@ interface WidgetProviderBaseProps extends WidgetConfigInput {
566
566
  analytics?: boolean;
567
567
  }
568
568
 
569
+ /**
570
+ * Copy for the states `WidgetProvider` renders *itself*, in place of the widget:
571
+ * the error-boundary fallback and the disclosures gate. A host overrides any
572
+ * subset through the `providerLabels` prop, which cascades like
573
+ * `disclosuresAcceptance`.
574
+ *
575
+ * Not named `Labels` on the public surface: a widget's own `labels` prop is a
576
+ * different thing, and these two travel together on every widget's props type.
577
+ */
578
+ interface WidgetProviderLabels {
579
+ /** Default copy for the built-in error boundary fallback. */
580
+ errorBoundaryFallback: string;
581
+ /** Heading when init reports disclosures are required and not yet accepted. */
582
+ disclosuresRequiredTitle: string;
583
+ /** Heading while a token-only refresh leaves init stale for the live token. */
584
+ disclosuresRefreshingTitle: string;
585
+ /** Supporting copy while the accept action is withheld for a stale init. */
586
+ disclosuresRefreshingDescription: string;
587
+ }
588
+
569
589
  /**
570
590
  * Props for {@link WidgetProvider}.
571
591
  *
@@ -578,8 +598,8 @@ interface WidgetProviderProps extends WidgetProviderBaseProps {
578
598
  * Fallback rendered when a render-time exception is caught inside this
579
599
  * provider's subtree. Pass either a `ReactNode` (rendered directly) or a
580
600
  * render-prop receiving `{ error, resetErrorBoundary }` from
581
- * `react-error-boundary`. Default is a plain `role="alert"` div with
582
- * generic copy from `DEFAULT_LABELS.errorBoundaryFallback`.
601
+ * `react-error-boundary`. Default is a plain `role="alert"` div whose copy
602
+ * comes from `providerLabels.errorBoundaryFallback`.
583
603
  */
584
604
  errorFallback?: ReactNode | ((props: FallbackProps) => ReactNode);
585
605
  /**
@@ -596,6 +616,15 @@ interface WidgetProviderProps extends WidgetProviderBaseProps {
596
616
  * WidgetProvider cannot import the widget itself (cycle).
597
617
  */
598
618
  disclosuresAcceptance?: ReactNode;
619
+ /**
620
+ * Overrides for the copy this provider renders in place of the widget: the
621
+ * built-in error-boundary fallback and the disclosures gate. Any subset;
622
+ * unlisted keys keep their defaults. Cascades like `linkComponent`.
623
+ *
624
+ * Named `providerLabels` rather than `labels` because a widget's own
625
+ * `labels` prop sits alongside this one on the same props type.
626
+ */
627
+ providerLabels?: Partial<WidgetProviderLabels>;
599
628
  }
600
629
 
601
630
  type ExpenseRequirementsWidgetProps = WidgetProviderProps & {
@@ -604,7 +633,7 @@ type ExpenseRequirementsWidgetProps = WidgetProviderProps & {
604
633
  /** @deprecated Use `organizationId` instead */
605
634
  orgId?: string | null;
606
635
  };
607
- declare function ExpenseRequirementsWidget({ token, orgId, widgetToken, organizationId, baseUrl, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, disclosuresAcceptance, }?: ExpenseRequirementsWidgetProps): React.JSX.Element;
636
+ declare function ExpenseRequirementsWidget({ token, orgId, widgetToken, organizationId, baseUrl, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, disclosuresAcceptance, providerLabels, }?: ExpenseRequirementsWidgetProps): React.JSX.Element;
608
637
 
609
638
  export { ExpenseRequirementsWidget };
610
639
  export type { ExpenseRequirementsWidgetProps };