@tesouro/embedded-components-react 0.5.215 → 0.5.217

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 (55) hide show
  1. package/dist/index.d.ts +56 -2
  2. package/dist/index.js +13 -12
  3. package/dist/lib/BankAccountOnboardingWidget.d.ts +56 -2
  4. package/dist/lib/BankAccountOnboardingWidget.js +4 -3
  5. package/dist/lib/MarketingWidget.js +1 -1
  6. package/dist/lib/WidgetSuite.d.ts +53 -0
  7. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index.js +3 -2
  8. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index11.js +72 -72
  9. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index12.js +4 -1
  10. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index13.js +15 -15
  11. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index14.js +60 -60
  12. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index15.js +12 -12
  13. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index16.js +16 -16
  14. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index18.js +11 -11
  15. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index21.js +8 -8
  16. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index22.js +71 -5
  17. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index23.js +95 -33
  18. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index24.js +6 -17
  19. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index25.js +16 -616
  20. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index26.js +669 -0
  21. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index.js +15 -13
  22. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index10.js +52 -37
  23. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index11.js +31 -37
  24. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index12.js +33 -89
  25. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index13.js +39 -12
  26. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index14.js +98 -2
  27. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index15.js +14 -4
  28. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index16.js +2 -185
  29. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index17.js +4 -30
  30. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index18.js +183 -21
  31. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index19.js +26 -66
  32. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index20.js +21 -233
  33. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index21.js +66 -27
  34. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index22.js +233 -26
  35. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index23.js +27 -72
  36. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index24.js +26 -85
  37. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index25.js +74 -8
  38. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index26.js +83 -55
  39. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index27.js +6 -7
  40. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index28.js +37 -42
  41. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index29.js +11 -0
  42. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index30.js +64 -0
  43. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index9.js +7 -33
  44. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index22.js +3 -1
  45. package/dist/libs/tesouro-embedded-components-react/marketing-widget/feature/dist/index.js +1 -1
  46. package/dist/libs/tesouro-embedded-components-react/marketing-widget/feature/dist/index5.js +16 -19
  47. package/dist/libs/tesouro-embedded-components-react/marketing-widget/feature/dist/index6.js +157 -16
  48. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/onboardingSuppressionReason.js +3 -1
  49. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/index.js +2 -1
  50. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  51. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/application/bankAccountApplication.js +26 -0
  52. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/lib/auditHistory/buildPayableAuditHistory.js +54 -36
  53. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index16.js +1 -1
  54. package/package.json +1 -1
  55. package/dist/libs/tesouro-embedded-components-react/marketing-widget/feature/dist/index7.js +0 -161
@@ -1,161 +0,0 @@
1
- "use client";
2
- "use client";
3
- "use client";
4
- "use client";
5
- import { useOrganizationApplicationStatus as e } from "../../../shared/data-access/dist/lib/useOrganizationApplicationStatus.js";
6
- import "../../../shared/data-access/dist/index.js";
7
- import { useAnalyticsTrack as t } from "../../../shared/feature/dist/lib/analytics/hooks.js";
8
- import { WidgetProvider as n } from "../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
9
- import { useWidgetConfig as r, useWidgetInitStaleForToken as i } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
10
- import "../../../shared/feature/dist/index.js";
11
- import { MARKETING_WIDGET_STATUS_LABELS_EN as a } from "./index4.js";
12
- import { MarketingWidgetAnalyticsEvent as o, WIDGET_NAME as s } from "./index2.js";
13
- import { marketingWidgetTestIds as c } from "./index3.js";
14
- import { MarketingApplicationView as l, deniedNoticeExpiresAt as u, marketingApplicationViewFor as d } from "./index5.js";
15
- import { selectBankAccountApplication as f } from "./index6.js";
16
- import { MARKETING_WIDGET_LABELS_EN as p } from "../../ui/dist/index2.js";
17
- import { MarketingBenefitIcon as m, MarketingWidgetStatusTone as h } from "../../ui/dist/index3.js";
18
- import { MarketingWidget as g } from "../../ui/dist/index9.js";
19
- import "../../ui/dist/index.js";
20
- import { useCallback as _, useEffect as v, useMemo as y, useReducer as b, useState as x } from "react";
21
- import { jsx as S } from "react/jsx-runtime";
22
- //#region ../../libs/tesouro-embedded-components-react/marketing-widget/feature/dist/index7.js
23
- var C = 2 ** 31 - 1, w = /* @__PURE__ */ new Set([
24
- "ACTIVE",
25
- "INACTIVE",
26
- "INVITED"
27
- ]), T = {
28
- [l.DraftStartedByOther]: "draftStartedByOther",
29
- [l.SubmittedByYou]: "submittedByYou",
30
- [l.SubmittedByOther]: "submittedByOther",
31
- [l.DeniedByYou]: "deniedByYou",
32
- [l.DeniedByOther]: "deniedByOther"
33
- }, E = {
34
- [l.DraftStartedByOther]: h.Brand,
35
- [l.SubmittedByYou]: h.Warning,
36
- [l.SubmittedByOther]: h.Warning,
37
- [l.DeniedByYou]: h.Danger,
38
- [l.DeniedByOther]: h.Danger
39
- };
40
- function D(e) {
41
- return e in T;
42
- }
43
- function O(e) {
44
- let t = a, n = (n) => ({
45
- ...t[n],
46
- ...e?.[n]
47
- });
48
- return {
49
- resumeApplication: e?.resumeApplication ?? t.resumeApplication,
50
- bankNameFallback: e?.bankNameFallback ?? t.bankNameFallback,
51
- formatDate: e?.formatDate ?? t.formatDate,
52
- draftStartedByOther: n("draftStartedByOther"),
53
- submittedByYou: n("submittedByYou"),
54
- submittedByOther: n("submittedByOther"),
55
- deniedByYou: n("deniedByYou"),
56
- deniedByOther: n("deniedByOther")
57
- };
58
- }
59
- function k(e, t, n) {
60
- let r = (e) => e ? n(e) : void 0;
61
- return {
62
- bankName: t,
63
- applicantName: [e?.applicantFirstName, e?.applicantLastName].map((e) => e?.trim()).filter(Boolean).join(" ") || void 0,
64
- startedOn: r(e?.createdAt),
65
- submittedOn: r(e?.submittedAt),
66
- deniedOn: r(e?.deniedAt)
67
- };
68
- }
69
- function A({ content: n, onPrimaryCtaClick: a, labels: s, statusLabels: p }) {
70
- let m = t(), { initResponse: h } = r(), A = i(), j = e(), [M, N] = x(!1), [P, F] = b((e) => e + 1, 0), I = y(() => f(j.applications), [j.applications]), L = u(I), R = y(() => O(p), [p]), z = d(I), B = h?.bankName || R.bankNameFallback, V = y(() => {
71
- if (!D(z)) return;
72
- let e = R[T[z]], t = k(I, B, R.formatDate);
73
- return {
74
- chipLabel: e.chipLabel,
75
- chipTone: E[z],
76
- heading: e.heading?.(t),
77
- body: e.body(t)
78
- };
79
- }, [
80
- I,
81
- B,
82
- R,
83
- z
84
- ]), H = y(() => z === l.Resume ? {
85
- ...s,
86
- applyNow: R.resumeApplication,
87
- primaryCta: R.resumeApplication
88
- } : s, [
89
- s,
90
- R.resumeApplication,
91
- z
92
- ]);
93
- v(() => {
94
- m(o.Mounted);
95
- }, [m]), v(() => {
96
- if (L === null) return;
97
- let e = L - Date.now();
98
- if (e < 0) return;
99
- let t = setTimeout(F, Math.min(e + 1, C));
100
- return () => clearTimeout(t);
101
- }, [L, P]);
102
- let U = !V && z !== l.Hidden;
103
- M && !U && N(!1);
104
- let W = _(() => {
105
- m(o.OpenModal), N(!0);
106
- }, [m]), G = _(() => {
107
- N(!1);
108
- }, []), K = _(() => {
109
- m(o.PrimaryCta), N(!1), a();
110
- }, [a, m]);
111
- return !h?.status || w.has(h.status) || A || !j.isResolved || z === l.Hidden ? null : /* @__PURE__ */ S(g, {
112
- open: M,
113
- vspLogo: n.vspLogo,
114
- bankingText: n.bankingText,
115
- primaryCaption: n.primaryCaption,
116
- secondaryCaption: n.secondaryCaption,
117
- providedByCaption: n.providedByCaption,
118
- primaryModalHeader: n.primaryModalHeader,
119
- howItWorksHeader: n.howItWorksHeader,
120
- howItWorksSteps: n.howItWorksSteps,
121
- fromDayOneHeader: n.fromDayOneHeader,
122
- benefits: n.benefits,
123
- appearance: n.appearance,
124
- onOpenMarketingModal: W,
125
- onCloseMarketingModal: G,
126
- onPrimaryCtaClick: K,
127
- statusMessage: V,
128
- labels: H,
129
- testIds: {
130
- root: c.root,
131
- learnMoreButton: c.learnMoreButton,
132
- applyNowButton: c.applyNowButton,
133
- statusMessage: c.statusMessage,
134
- modal: {
135
- root: c.modal,
136
- primaryCtaButton: c.primaryCtaButton
137
- }
138
- }
139
- });
140
- }
141
- function j({ baseUrl: e, widgetToken: t, organizationId: r, configClient: i, gatewayRouting: a, linkComponent: o, implementation: c, uiFramework: l, errorFallback: u, onError: d, analytics: f, disclosuresAcceptance: p, providerLabels: m, ...h }) {
142
- return /* @__PURE__ */ S(n, {
143
- widgetName: s,
144
- baseUrl: e,
145
- widgetToken: t,
146
- organizationId: r,
147
- configClient: i,
148
- gatewayRouting: a,
149
- linkComponent: o,
150
- implementation: c,
151
- uiFramework: l,
152
- errorFallback: u,
153
- onError: d,
154
- analytics: f,
155
- disclosuresAcceptance: p,
156
- providerLabels: m,
157
- children: /* @__PURE__ */ S(A, { ...h })
158
- });
159
- }
160
- //#endregion
161
- export { p as MARKETING_WIDGET_LABELS_EN, a as MARKETING_WIDGET_STATUS_LABELS_EN, m as MarketingBenefitIcon, j as MarketingWidget };