@tesouro/embedded-components-react 0.5.233 → 0.5.236

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 (87) hide show
  1. package/README.md +19 -14
  2. package/dist/index.d.ts +175 -16
  3. package/dist/index.js +1 -1
  4. package/dist/lib/BankAccountOnboardingWidget.d.ts +39 -1
  5. package/dist/lib/ReceivablesWidget.d.ts +110 -1
  6. package/dist/lib/ReceivablesWidget.js +1 -1
  7. package/dist/lib/WidgetSuite.d.ts +65 -15
  8. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index.js +3 -2
  9. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index12.js +2 -1
  10. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index22.js +6 -0
  11. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index23.js +15 -11
  12. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index26.js +441 -409
  13. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index10.js +18 -14
  14. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index.js +1 -1
  15. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index10.js +1 -1
  16. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index15.js +1 -1
  17. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index16.js +3 -3
  18. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index19.js +1 -1
  19. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index21.js +1 -1
  20. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index23.js +1 -1
  21. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index31.js +210 -208
  22. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index32.js +98 -40
  23. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index33.js +159 -39
  24. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index34.js +53 -77
  25. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index35.js +99 -132
  26. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index36.js +40 -341
  27. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index37.js +43 -0
  28. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index38.js +92 -0
  29. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index39.js +146 -0
  30. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index40.js +354 -0
  31. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index5.js +1 -1
  32. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index9.js +1 -1
  33. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +28 -24
  34. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index10.js +2 -37
  35. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index11.js +9 -214
  36. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index12.js +27 -159
  37. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index13.js +233 -14
  38. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index14.js +34 -22
  39. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index15.js +214 -2
  40. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index16.js +153 -87
  41. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index17.js +16 -3
  42. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index18.js +22 -21
  43. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index19.js +2 -51
  44. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index2.js +30 -15
  45. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index20.js +90 -14
  46. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index21.js +3 -10
  47. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index22.js +20 -69
  48. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index23.js +51 -33
  49. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index24.js +16 -17
  50. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index25.js +8 -14
  51. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index26.js +70 -30
  52. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index27.js +33 -14
  53. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index28.js +17 -25
  54. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index29.js +12 -83
  55. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index3.js +9 -121
  56. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index30.js +28 -401
  57. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index31.js +16 -2
  58. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index32.js +22 -42
  59. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index33.js +80 -65
  60. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index34.js +383 -473
  61. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index35.js +2 -106
  62. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index36.js +48 -0
  63. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index37.js +72 -2
  64. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index38.js +498 -4
  65. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index39.js +106 -1
  66. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index4.js +141 -93
  67. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index41.js +2 -28
  68. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index42.js +4 -236
  69. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index43.js +0 -2
  70. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index44.js +90 -239
  71. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index45.js +24 -89
  72. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index46.js +231 -54
  73. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index47.js +3 -353
  74. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index48.js +249 -0
  75. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index49.js +93 -0
  76. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index5.js +3 -40
  77. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index50.js +59 -0
  78. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index51.js +353 -0
  79. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index6.js +18 -2
  80. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index7.js +121 -9
  81. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index8.js +100 -27
  82. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index9.js +38 -233
  83. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  84. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index16.js +123 -92
  85. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index4.js +12 -5
  86. package/package.json +1 -1
  87. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index40.js +0 -100
@@ -1031,6 +1031,11 @@ interface ApplicationStatusLabels {
1031
1031
  bankDisclosure: string;
1032
1032
  /** Screen-reader name of the dialog's close control, in modal mode. */
1033
1033
  close: string;
1034
+ /**
1035
+ * The re-check control under the card, shown only when the host opts in with
1036
+ * `showApplicationStatusRefresh`.
1037
+ */
1038
+ checkAgain: string;
1034
1039
  /**
1035
1040
  * Formats an application date (an ISO date-time from the status read). A
1036
1041
  * label, not a hardcoded formatter, so a host can localize it with the copy.
@@ -1041,6 +1046,12 @@ interface ApplicationStatusLabels {
1041
1046
  submittedByOther: ApplicationStatusNoticeLabels;
1042
1047
  deniedByYou: ApplicationStatusNoticeLabels;
1043
1048
  deniedByOther: ApplicationStatusNoticeLabels;
1049
+ /**
1050
+ * Shown when a re-check moves a card to a status this widget has nothing to
1051
+ * say about (one added after it shipped, say), so the
1052
+ * re-check control still has somewhere to live.
1053
+ */
1054
+ unavailable: ApplicationStatusNoticeLabels;
1044
1055
  }
1045
1056
  interface BankAccountOnboardingWidgetLabels {
1046
1057
  stepIndicator: {
@@ -1137,6 +1148,12 @@ interface BankAccountOnboardingWidgetInnerProps {
1137
1148
  * scope can start a fresh one. Set by the session scope, not by hosts.
1138
1149
  */
1139
1150
  onApplicationDeleted?: () => void;
1151
+ /**
1152
+ * Called when a re-read of the status replaces a status card with the
1153
+ * form, so the session scope can re-take the resume decision it froze while
1154
+ * the card was showing. Set by the session scope, not by hosts.
1155
+ */
1156
+ onNoticeReplacedByForm?: () => void;
1140
1157
  bankLogoSrc?: string;
1141
1158
  /**
1142
1159
  * Host-resolved disclosure URLs for the business-details agreement step.
@@ -1170,8 +1187,29 @@ interface BankAccountOnboardingWidgetInnerProps {
1170
1187
  * to them (e.g. by unmounting the widget).
1171
1188
  */
1172
1189
  isFullScreenInline?: boolean;
1190
+ /**
1191
+ * Puts a "Check again" control under the application status card, which
1192
+ * re-reads the organization's application.
1193
+ *
1194
+ * The widget providers disable `refetchOnWindowFocus`, so without it a
1195
+ * session looking at a colleague's application has no way to see that
1196
+ * colleague finish short of a reload. Opt-in because a host with its own
1197
+ * refresh affordance (or one that remounts the widget) would get two. The
1198
+ * control renders only with the card, never over the form or the widget's
1199
+ * own processing and result screens.
1200
+ */
1201
+ showApplicationStatusRefresh?: boolean;
1202
+ /**
1203
+ * Called with `true` when the widget starts processing a submitted
1204
+ * application, and with `false` if it unmounts after that. In between, the
1205
+ * widget keeps its processing or result screen up whatever the status read
1206
+ * says, so a host that would otherwise replace the widget on a status change
1207
+ * (as `WidgetSuite` does when the widget would render nothing) should leave
1208
+ * it mounted while this is `true`.
1209
+ */
1210
+ onResultPhaseChange?: (isInResultPhase: boolean) => void;
1173
1211
  }
1174
- type BankAccountOnboardingWidgetProps = WidgetProviderProps & Omit<BankAccountOnboardingWidgetInnerProps, 'initialApplicationId' | 'initialBoundAuthEpoch' | 'initialBusinessDetails' | 'initialPersonalDetails' | 'initialAdditionalOwners' | 'onEditableDraftChange' | 'onApplicationDeleted'> & {
1212
+ type BankAccountOnboardingWidgetProps = WidgetProviderProps & Omit<BankAccountOnboardingWidgetInnerProps, 'initialApplicationId' | 'initialBoundAuthEpoch' | 'initialBusinessDetails' | 'initialPersonalDetails' | 'initialAdditionalOwners' | 'onEditableDraftChange' | 'onApplicationDeleted' | 'onNoticeReplacedByForm'> & {
1175
1213
  initialBusinessDetails?: Partial<HostSupplied<BusinessDetailsValues>>;
1176
1214
  initialPersonalDetails?: Partial<HostSupplied<PersonalDetailsValues>>;
1177
1215
  initialAdditionalOwners?: HostSuppliedOwner[];
@@ -2868,30 +2906,41 @@ interface WidgetSuiteDisclosureLabels {
2868
2906
  };
2869
2907
  }
2870
2908
  /**
2871
- * Copy for the suite's entry-point gate — which of onboarding, the "ask your
2872
- * admin" message, or the normal suite a fresh (non-invited) session sees
2909
+ * Copy for the suite's entry-point gate — which of onboarding, the
2910
+ * unavailable state, or the normal suite a fresh (non-invited) session sees
2873
2911
  * before the menu ever renders. Sibling to `disclosure`, which covers the
2874
- * acceptance half of that same gate; only the admin-message state needs copy
2875
- * here, since the onboarding widget and the normal shell carry their own.
2912
+ * acceptance half of that same gate; only the unavailable state needs copy
2913
+ * here, since the onboarding widget (form and status card alike) and the
2914
+ * normal shell carry their own.
2876
2915
  */
2877
2916
  interface WidgetSuiteOnboardingGateLabels {
2878
2917
  /**
2879
2918
  * Shown instead of the onboarding widget when the organization's
2880
- * bank-account application is already in progress under a different
2881
- * member. The backend allows one application per organization, so this
2882
- * session can neither start nor resume one — only that colleague, or an
2883
- * org admin, can move it forward.
2919
+ * bank-account application is one the widget renders nothing for: denied
2920
+ * more than 30 days ago, or in a status it has no copy for. Without it the
2921
+ * page would be blank.
2884
2922
  */
2885
- applicationInFlightState: {
2923
+ applicationUnavailableState: {
2886
2924
  title: string;
2887
2925
  body: string;
2888
2926
  /**
2889
2927
  * The widget providers disable `refetchOnWindowFocus`, so nothing else
2890
- * re-checks whether that colleague has since finished — this button is
2891
- * the only way forward short of a reload.
2928
+ * re-reads the status — this button is the only way forward short of a
2929
+ * reload.
2892
2930
  */
2893
2931
  retryButton: string;
2894
2932
  };
2933
+ /**
2934
+ * @deprecated Ignored since EMBD-6416. A colleague's application now shows
2935
+ * the onboarding widget's status card, whose copy is under
2936
+ * `onboarding.labels.applicationStatus`. Kept so an existing override still
2937
+ * compiles; it will be removed in a future major version.
2938
+ */
2939
+ applicationInFlightState: {
2940
+ title: string;
2941
+ body: string;
2942
+ retryButton: string;
2943
+ };
2895
2944
  }
2896
2945
  /**
2897
2946
  * A widget's whole copy surface: every label prop it accepts, spread onto it so
@@ -3098,9 +3147,10 @@ interface WidgetSuiteProps extends WidgetProviderProps {
3098
3147
  * before the shell renders: placeholders while either has not settled, a
3099
3148
  * closed retry state when init fails before answering the disclosure flags,
3100
3149
  * the acceptance surface alone when the session owes the bank's disclosures,
3101
- * full-screen onboarding for a session whose organization has no application
3102
- * yet, an "ask your admin" message when a teammate's is already in flight, or
3103
- * the nav over its sections. An invited session, or one this init already
3150
+ * full-screen onboarding for a prospect session (the form, or the widget's
3151
+ * status card for an application already under way), a closed "check again"
3152
+ * state for an application the widget has nothing to show for, or the nav
3153
+ * over its sections. An invited session, or one this init already
3104
3154
  * reports ACTIVE/INACTIVE, skips the application question entirely and goes
3105
3155
  * straight to the disclosure gate — which also means neither a failed
3106
3156
  * status read nor a teammate's in-flight application can blank the suite for
@@ -1,3 +1,4 @@
1
1
  import { APPLICATION_STATUS_LABELS_EN as e } from "./index22.js";
2
- import { BankAccountOnboardingWidget as t } from "./index26.js";
3
- export { e as APPLICATION_STATUS_LABELS_EN, t as BankAccountOnboardingWidget };
2
+ import { OnboardingApplicationView as t, onboardingApplicationViewFor as n } from "./index23.js";
3
+ import { BankAccountOnboardingWidget as r } from "./index26.js";
4
+ export { e as APPLICATION_STATUS_LABELS_EN, r as BankAccountOnboardingWidget, t as OnboardingApplicationView, n as onboardingApplicationViewFor };
@@ -37,7 +37,8 @@ var e = {
37
37
  resultDashboardButton: "bank-account-onboarding-result-dashboard-button",
38
38
  statusCard: "bank-account-onboarding-status-card",
39
39
  statusCardChip: "bank-account-onboarding-status-card-chip",
40
- statusCardClose: "bank-account-onboarding-status-card-close"
40
+ statusCardClose: "bank-account-onboarding-status-card-close",
41
+ statusCardCheckAgain: "bank-account-onboarding-status-card-check-again"
41
42
  };
42
43
  //#endregion
43
44
  export { e as bankAccountOnboardingTestIds };
@@ -8,6 +8,7 @@ var n = {
8
8
  title: "Business bank account application",
9
9
  bankDisclosure: "{bankName}, Member FDIC",
10
10
  close: "Close",
11
+ checkAgain: "Check again",
11
12
  formatDate: (e) => new Date(e).toLocaleDateString("en-US", {
12
13
  month: "short",
13
14
  day: "numeric",
@@ -35,6 +36,11 @@ var n = {
35
36
  deniedByOther: {
36
37
  chipLabel: "Not approved",
37
38
  body: ({ bankName: e, applicantName: t }) => [`${e} was unable to approve your business's application.`, `${t ?? "The applicant"} has the details.`]
39
+ },
40
+ unavailable: {
41
+ chipLabel: "Unavailable",
42
+ heading: () => "We can't show your application",
43
+ body: () => ["Your organization's bank account application isn't available here. Contact your organization admin or the bank for details."]
38
44
  }
39
45
  }, r = {
40
46
  stepIndicator: {
@@ -42,20 +42,22 @@ function c(t) {
42
42
  default: return e.OrganizationApplicationStatusUnrecognized;
43
43
  }
44
44
  }
45
- var l = {
45
+ var l = "unavailable", u = {
46
46
  [a.DraftStartedByOther]: "draftStartedByOther",
47
47
  [a.SubmittedByYou]: "submittedByYou",
48
48
  [a.SubmittedByOther]: "submittedByOther",
49
49
  [a.DeniedByYou]: "deniedByYou",
50
- [a.DeniedByOther]: "deniedByOther"
51
- }, u = {
50
+ [a.DeniedByOther]: "deniedByOther",
51
+ [l]: "unavailable"
52
+ }, d = {
52
53
  [a.DraftStartedByOther]: r.Brand,
53
54
  [a.SubmittedByYou]: r.Warning,
54
55
  [a.SubmittedByOther]: r.Warning,
55
56
  [a.DeniedByYou]: r.Danger,
56
- [a.DeniedByOther]: r.Danger
57
+ [a.DeniedByOther]: r.Danger,
58
+ [l]: r.Warning
57
59
  };
58
- function d(e) {
60
+ function f(e) {
59
61
  let t = i, n = (n) => ({
60
62
  ...t[n],
61
63
  ...e?.[n]
@@ -64,15 +66,17 @@ function d(e) {
64
66
  title: e?.title ?? t.title,
65
67
  bankDisclosure: e?.bankDisclosure ?? t.bankDisclosure,
66
68
  close: e?.close ?? t.close,
69
+ checkAgain: e?.checkAgain ?? t.checkAgain,
67
70
  formatDate: e?.formatDate ?? t.formatDate,
68
71
  draftStartedByOther: n("draftStartedByOther"),
69
72
  submittedByYou: n("submittedByYou"),
70
73
  submittedByOther: n("submittedByOther"),
71
74
  deniedByYou: n("deniedByYou"),
72
- deniedByOther: n("deniedByOther")
75
+ deniedByOther: n("deniedByOther"),
76
+ unavailable: n("unavailable")
73
77
  };
74
78
  }
75
- function f(e, t, n) {
79
+ function p(e, t, n) {
76
80
  let r = (e) => e ? n(e) : void 0;
77
81
  return {
78
82
  bankName: t,
@@ -82,10 +86,10 @@ function f(e, t, n) {
82
86
  deniedOn: r(e?.deniedAt)
83
87
  };
84
88
  }
85
- function p(e, t, r, i) {
86
- let a = i[l[e]], o = f(t, r, i.formatDate);
89
+ function m(e, t, r, i) {
90
+ let a = i[u[e]], o = p(t, r, i.formatDate);
87
91
  return {
88
- chipTone: u[e],
92
+ chipTone: d[e],
89
93
  labels: {
90
94
  title: i.title,
91
95
  bankDisclosure: n(i.bankDisclosure, r),
@@ -96,4 +100,4 @@ function p(e, t, r, i) {
96
100
  };
97
101
  }
98
102
  //#endregion
99
- export { a as OnboardingApplicationView, p as applicationStatusNoticeFor, c as hiddenViewReason, o as isNoticeView, d as mergeApplicationStatusLabels, s as onboardingApplicationViewFor };
103
+ export { a as OnboardingApplicationView, l as UNAVAILABLE_STATUS_CARD, m as applicationStatusNoticeFor, c as hiddenViewReason, o as isNoticeView, f as mergeApplicationStatusLabels, s as onboardingApplicationViewFor };