@tesouro/embedded-components-react 0.11.223 → 0.11.224

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 (21) hide show
  1. package/README.md +12 -2
  2. package/dist/index.d.ts +14 -2
  3. package/dist/lib/BankAccountOnboardingWidget.d.ts +12 -0
  4. package/dist/lib/WidgetProvider.d.ts +2 -2
  5. package/dist/lib/WidgetSuite.d.ts +12 -0
  6. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/data-access/dist/index.js +2 -1
  7. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/data-access/dist/index13.js +17 -0
  8. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/BankAccountOnboardingWidget.js +335 -321
  9. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/labels.js +9 -1
  10. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/testIds.js +2 -0
  11. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/analytics/events.js +2 -1
  12. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/deviceProfiling/DeviceProfiling.js +50 -0
  13. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/deviceProfiling/deviceProfilingPage.js +119 -0
  14. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/deviceProfiling/index.js +1 -0
  15. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/deviceProfiling/useDeviceProfiling.js +88 -0
  16. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/mocks/bankAccountOnboarding.js +57 -54
  17. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  18. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/index.js +3 -2
  19. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/lib/csp.js +1 -1
  20. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/lib/loadScript.js +17 -0
  21. package/package.json +1 -1
@@ -88,6 +88,14 @@ var n = {
88
88
  saveDraftNothingValidError: "Fix the highlighted fields before saving, or discard your changes.",
89
89
  fallbackBankName: "Member Bank",
90
90
  shellFdicDisclaimer: "Products and services are offered by {bankName}, N.A., Member FDIC.",
91
- applicationStatus: n
91
+ applicationStatus: n,
92
+ deviceProfiling: {
93
+ loading: "Loading application",
94
+ blockedTitle: "Couldn't check your browser",
95
+ blockedDescription: "This application needs a security check that your browser blocked. Turn off ad blockers or tracking protection for this site, then try again.",
96
+ unavailableTitle: "Couldn't start your application",
97
+ unavailableDescription: "This page can't run a security check this application needs. Try again later, or contact the site's support team.",
98
+ retry: "Try again"
99
+ }
92
100
  };
93
101
  export { n as APPLICATION_STATUS_LABELS_EN, r as DEFAULT_LABELS };
@@ -13,6 +13,8 @@ var e = {
13
13
  deleteDialogCancel: "delete-application-dialog-cancel",
14
14
  applicationDeletedScreen: "application-deleted-screen",
15
15
  applicationDeletedStartNew: "application-deleted-start-new",
16
+ deviceProfilingLoading: "device-profiling-loading",
17
+ deviceProfilingBlocked: "device-profiling-blocked",
16
18
  businessDetailsPanel: "business-details-panel",
17
19
  businessDetailsEditButton: "business-details-edit-button",
18
20
  businessDetailsSummary: "business-details-summary",
@@ -2,6 +2,7 @@
2
2
  var e = {
3
3
  Mounted: "onboarding.mounted",
4
4
  Suppressed: "onboarding.suppressed",
5
- ApplicationStatusShown: "onboarding.application_status_shown"
5
+ ApplicationStatusShown: "onboarding.application_status_shown",
6
+ DeviceProfilingBlocked: "onboarding.device_profiling_blocked"
6
7
  }, t = "onboarding";
7
8
  export { e as OnboardingAnalyticsEvent, t as WIDGET_NAME };
@@ -0,0 +1,50 @@
1
+ "use client";
2
+ "use client";
3
+ "use client";
4
+ "use client";
5
+ import { Skeleton as e } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
6
+ import { ErrorState as t } from "../../../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
7
+ import { LoadingRegion as n } from "../../../../../shared/ui/dist/lib/LoadingRegion/LoadingRegion.js";
8
+ import "../../../../../shared/ui/dist/index.js";
9
+ import { DeviceProfilingFailure as r } from "./deviceProfilingPage.js";
10
+ import { DEVICE_PROFILING_OFF as i, useDeviceProfiling as a } from "./useDeviceProfiling.js";
11
+ import { Activity as o, createContext as s, useContext as c, useState as l } from "react";
12
+ import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
13
+ // ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/deviceProfiling/DeviceProfiling.js
14
+ var p = s(i);
15
+ function m({ children: e }) {
16
+ let t = a();
17
+ return /* @__PURE__ */ d(p.Provider, {
18
+ value: t,
19
+ children: e
20
+ });
21
+ }
22
+ var h = /* @__PURE__ */ new Set([r.HostLoadedSdk, r.SessionConflict]);
23
+ function g({ labels: r, testIds: i, className: a, children: s }) {
24
+ let m = c(p), [g, _] = l(!1), v = m.status === "blocked" || !g && (m.status === "checking" || m.status === "pending");
25
+ !v && !g && _(!0);
26
+ let y = null;
27
+ return m.status === "blocked" ? y = /* @__PURE__ */ d(t, {
28
+ title: h.has(m.failure) ? r.unavailableTitle : r.blockedTitle,
29
+ description: h.has(m.failure) ? r.unavailableDescription : r.blockedDescription,
30
+ retryLabel: r.retry,
31
+ onRetry: m.retry,
32
+ testId: i?.blocked
33
+ }) : m.status === "pending" && (y = /* @__PURE__ */ f(n, {
34
+ isLoading: !0,
35
+ loadingLabel: r.loading,
36
+ "data-testid": i?.loading,
37
+ className: "ttw:flex ttw:w-full ttw:max-w-2xl ttw:flex-col ttw:gap-4",
38
+ children: [/* @__PURE__ */ d(e, {
39
+ height: 32,
40
+ width: "60%"
41
+ }), /* @__PURE__ */ d(e, { height: 240 })]
42
+ })), /* @__PURE__ */ f(u, { children: [v && y ? /* @__PURE__ */ d("div", {
43
+ className: a,
44
+ children: y
45
+ }) : null, v && !g ? null : /* @__PURE__ */ d(o, {
46
+ mode: v ? "hidden" : "visible",
47
+ children: s
48
+ })] });
49
+ }
50
+ export { g as DeviceProfilingGate, m as DeviceProfilingProvider };
@@ -0,0 +1,119 @@
1
+ import { loadScript as e } from "../../../../../shared/util/dist/lib/loadScript.js";
2
+ import "../../../../../shared/util/dist/index.js";
3
+ // ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/deviceProfiling/deviceProfilingPage.js
4
+ var t = "https://scripts.alloy.com/2/16/alloy_sdk_bundle.js", n = 2e4, r = {
5
+ EndpointFailed: "endpoint_failed",
6
+ ScriptBlocked: "script_blocked",
7
+ InitIncomplete: "init_incomplete",
8
+ InitTimedOut: "init_timed_out",
9
+ HostLoadedSdk: "host_loaded_sdk",
10
+ SessionConflict: "session_conflict"
11
+ }, i = "__tesouroDeviceProfilingV1";
12
+ function a() {
13
+ return window;
14
+ }
15
+ function o() {
16
+ let e = a();
17
+ return e[i] ??= {
18
+ sdkScript: null,
19
+ lookups: /* @__PURE__ */ new Map(),
20
+ session: null,
21
+ sessionEndListeners: /* @__PURE__ */ new Set()
22
+ }, e[i];
23
+ }
24
+ function s({ sdk: e, sessionId: t }) {
25
+ return `${t} ${JSON.stringify(e)}`;
26
+ }
27
+ function c(e, t) {
28
+ let { lookups: n } = o(), r = n.get(e);
29
+ if (r) return r;
30
+ let i = t().finally(() => n.delete(e));
31
+ return n.set(e, i), i;
32
+ }
33
+ var l = (e) => ({
34
+ status: "failed",
35
+ failure: e
36
+ });
37
+ async function u(n, { sdk: i, sessionId: o }, s) {
38
+ if (n.sdkScript === null && a().alloy !== void 0) return l(r.HostLoadedSdk);
39
+ n.sdkScript ??= e(t).catch((e) => {
40
+ throw n.sdkScript = null, e;
41
+ });
42
+ try {
43
+ await n.sdkScript;
44
+ } catch {
45
+ return l(r.ScriptBlocked);
46
+ }
47
+ if (!s()) return l(r.InitIncomplete);
48
+ let c = a().alloy;
49
+ if (typeof c?.init != "function") return l(r.ScriptBlocked);
50
+ try {
51
+ let e = (await c.init({
52
+ key: i.key,
53
+ journeyToken: i.journeyToken,
54
+ production: i.production,
55
+ externalSessionId: o,
56
+ ...i.bcContext ? { bcContext: i.bcContext } : {}
57
+ }))?.alloyRequestFields;
58
+ return e?.external_session_id === o ? {
59
+ status: "ready",
60
+ requestFields: e
61
+ } : l(r.InitIncomplete);
62
+ } catch {
63
+ return l(r.InitIncomplete);
64
+ }
65
+ }
66
+ function d(e, t) {
67
+ e.result = t;
68
+ for (let t of [...e.listeners]) t();
69
+ }
70
+ function f(e, t, i) {
71
+ let a = ++t.run, o = () => t.run === a && e.session === t;
72
+ d(t, { status: "running" }), clearTimeout(t.timer);
73
+ let s = new Promise((e) => {
74
+ t.timer = setTimeout(() => e(l(r.InitTimedOut)), n);
75
+ });
76
+ Promise.race([u(e, i, o), s]).then((n) => {
77
+ t.run === a && (clearTimeout(t.timer), e.session === t && d(t, n));
78
+ });
79
+ }
80
+ function p(e, t) {
81
+ if (e.session === t) {
82
+ e.session = null, clearTimeout(t.timer);
83
+ for (let t of [...e.sessionEndListeners]) t();
84
+ }
85
+ }
86
+ function m(e) {
87
+ let t = o(), n = s(e), r = t.session;
88
+ if (r && r.key !== n) {
89
+ if (r.holders > 0) return null;
90
+ p(t, r), r = null;
91
+ }
92
+ r || (r = {
93
+ key: n,
94
+ holders: 0,
95
+ result: { status: "running" },
96
+ run: 0,
97
+ listeners: /* @__PURE__ */ new Set()
98
+ }, t.session = r, f(t, r, e));
99
+ let i = r;
100
+ i.holders += 1;
101
+ let a = !1;
102
+ return {
103
+ read: () => i.result,
104
+ subscribe: (e) => (i.listeners.add(e), () => i.listeners.delete(e)),
105
+ retry: () => {
106
+ t.session === i && i.result.status === "failed" && f(t, i, e);
107
+ },
108
+ release: () => {
109
+ a || (a = !0, --i.holders, queueMicrotask(() => {
110
+ i.holders === 0 && p(t, i);
111
+ }));
112
+ }
113
+ };
114
+ }
115
+ function h(e) {
116
+ let { sessionEndListeners: t } = o();
117
+ return t.add(e), () => t.delete(e);
118
+ }
119
+ export { t as DEVICE_PROFILING_SDK_URL, n as DEVICE_PROFILING_TIMEOUT_MS, r as DeviceProfilingFailure, m as holdProfilingSession, c as lookUpDeviceProfiling, h as onProfilingSessionEnd, s as profilingSessionKey };
@@ -0,0 +1,88 @@
1
+ "use client";
2
+ "use client";
3
+ "use client";
4
+ "use client";
5
+ import { widgetTokenCacheId as e } from "../../../../../shared/data-access/dist/lib/widgetTokenCacheId.js";
6
+ import { useEmbedApi as t } from "../../../../../shared/data-access/dist/lib/EmbedApiContext.js";
7
+ import "../../../../../shared/data-access/dist/index.js";
8
+ import { useAnalyticsTrack as n } from "../../../../../shared/feature/dist/lib/analytics/hooks.js";
9
+ import "../../../../../shared/feature/dist/index.js";
10
+ import { OnboardingAnalyticsEvent as r } from "../analytics/events.js";
11
+ import { DeviceProfilingFailure as i, holdProfilingSession as a, lookUpDeviceProfiling as o, onProfilingSessionEnd as s, profilingSessionKey as c } from "./deviceProfilingPage.js";
12
+ import { fetchDeviceProfiling as l } from "../../../../data-access/dist/index13.js";
13
+ import "../../../../data-access/dist/index.js";
14
+ import { useEffect as u, useMemo as d, useRef as f, useState as p, useSyncExternalStore as m } from "react";
15
+ // ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/deviceProfiling/useDeviceProfiling.js
16
+ var h = { status: "off" }, g = { status: "checking" }, _ = { status: "pending" }, v = () => () => void 0;
17
+ function y() {
18
+ let { client: y, widgetToken: b } = t(), x = n(), [S, C] = p(null), [w, T] = p(!1), [E, D] = p(0), O = !!b, [k, A] = p({
19
+ client: y,
20
+ hasToken: O
21
+ });
22
+ (y !== k.client || O !== k.hasToken) && (A({
23
+ client: y,
24
+ hasToken: O
25
+ }), C(null), T(!1)), u(() => {
26
+ if (!b) return;
27
+ let t = !0, n = `${y.getConfig().baseUrl ?? ""} ${e(b)}`;
28
+ return o(n, () => l({
29
+ client: y,
30
+ widgetToken: b
31
+ })).then((e) => {
32
+ t && (C({ profiling: e }), T(!1));
33
+ }, () => {
34
+ t && T(!0);
35
+ }), () => {
36
+ t = !1;
37
+ };
38
+ }, [
39
+ y,
40
+ b,
41
+ E
42
+ ]);
43
+ let j = S?.profiling ?? null, M = f(j);
44
+ M.current = j;
45
+ let N = j ? c(j) : null, [P, F] = p(null), [I, L] = p(0);
46
+ u(() => {
47
+ let e = M.current;
48
+ if (N === null || e === null) {
49
+ F(null);
50
+ return;
51
+ }
52
+ let t = a(e);
53
+ return t === null ? (F("conflict"), s(() => L((e) => e + 1))) : (F(t), () => t.release());
54
+ }, [N, I]);
55
+ let R = P === "conflict" ? null : P, z = m(R?.subscribe ?? v, () => R?.read() ?? null, () => null), B = d(() => w && S?.profiling !== null ? {
56
+ failure: i.EndpointFailed,
57
+ retry: () => {
58
+ T(!1), D((e) => e + 1);
59
+ }
60
+ } : P === "conflict" ? {
61
+ failure: i.SessionConflict,
62
+ retry: () => L((e) => e + 1)
63
+ } : z?.status === "failed" ? {
64
+ failure: z.failure,
65
+ retry: () => R?.retry()
66
+ } : null, [
67
+ w,
68
+ S,
69
+ P,
70
+ R,
71
+ z
72
+ ]), V = B?.failure ?? null;
73
+ return u(() => {
74
+ V && x(r.DeviceProfilingBlocked, { reason: V });
75
+ }, [V, x]), d(() => B ? {
76
+ status: "blocked",
77
+ ...B
78
+ } : S ? S.profiling ? z?.status === "ready" ? {
79
+ status: "ready",
80
+ requestFields: z.requestFields
81
+ } : _ : h : E > 0 ? _ : g, [
82
+ B,
83
+ S,
84
+ E,
85
+ z
86
+ ]);
87
+ }
88
+ export { h as DEVICE_PROFILING_OFF, y as useDeviceProfiling };
@@ -1,88 +1,91 @@
1
- import { A_BANK_ACCOUNT_APPLICATION as e, A_COMPLETE_BANK_ACCOUNT_APPLICATION as t, A_DISCLOSURES_SET as n, A_DISCLOSURE_ACCEPTANCE as r } from "../../../../shared/data-access-mocks/dist/lib/fixtures.js";
2
- import { IDENTITY as i, PROXY as a, endpoint as o, initRoute as s, json as c, noContent as l, problem as u } from "../../../../shared/data-access-mocks/dist/mocks/scenarios/scenario.js";
3
- import { AN_APPLICANT as d, A_BUSINESS_DETAILS as f } from "./fixtures.js";
4
- import { BANK_ACCOUNT_ONBOARDING_LABELS as p } from "./labels.js";
1
+ import { DEVICE_PROFILING_PATH as e } from "../../../data-access/dist/index13.js";
2
+ import "../../../data-access/dist/index.js";
3
+ import { A_BANK_ACCOUNT_APPLICATION as t, A_COMPLETE_BANK_ACCOUNT_APPLICATION as n, A_DISCLOSURES_SET as r, A_DISCLOSURE_ACCEPTANCE as i } from "../../../../shared/data-access-mocks/dist/lib/fixtures.js";
4
+ import { IDENTITY as a, PROXY as o, endpoint as s, initRoute as c, json as l, noContent as u, problem as d } from "../../../../shared/data-access-mocks/dist/mocks/scenarios/scenario.js";
5
+ import { AN_APPLICANT as f, A_BUSINESS_DETAILS as p } from "./fixtures.js";
6
+ import { BANK_ACCOUNT_ONBOARDING_LABELS as m } from "./labels.js";
5
7
  // ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/mocks/bankAccountOnboarding.js
6
- var m = `${a}/bank-account-applications`, h = `${m}/:id`, g = `${a}/application-status`, _ = "/api/widget-gateway/disclosure-acceptance", v = {
8
+ var h = `${o}/bank-account-applications`, g = `${h}/:id`, _ = `${o}/application-status`, v = "/api/widget-gateway/disclosure-acceptance", y = {
7
9
  status: "NOT_FOUND",
8
10
  organizationId: null,
9
11
  userId: null,
10
12
  bankName: "Example Bank"
11
- }, y = { bankName: "Example Bank" }, b = "00000000-0000-4000-8000-000000000242", x = {
12
- ...e,
13
- id: b,
14
- businessDetails: f,
15
- applicant: d
16
- }, S = (e, n, r) => ({
13
+ }, b = { bankName: "Example Bank" }, x = "00000000-0000-4000-8000-000000000242", S = {
17
14
  ...t,
15
+ id: x,
16
+ businessDetails: p,
17
+ applicant: f
18
+ }, C = (e, t, r) => ({
19
+ ...n,
18
20
  applicationId: e.id,
19
21
  createdAt: e.createdAt,
20
- status: n,
22
+ status: t,
21
23
  clientSecret: r,
22
- submittedAt: n === "DRAFT" ? null : t.submittedAt
23
- }), C = {
24
- ...t,
24
+ submittedAt: t === "DRAFT" ? null : n.submittedAt
25
+ }), w = {
26
+ ...n,
25
27
  ownership: "STARTED_BY_OTHER",
26
28
  status: "DRAFT",
27
29
  applicationId: null,
28
30
  submittedAt: null,
29
31
  applicantFirstName: "Jordan",
30
32
  applicantLastName: "Lee"
31
- }, w = 864e5, T = (e) => (/* @__PURE__ */ new Date(Date.now() - e * w)).toISOString(), E = (e, t = {}) => ({
32
- ...S(x, e, null),
33
- submittedAt: T(5),
34
- updatedAt: T(e === "DENIED" ? 2 : 5),
33
+ }, T = 864e5, E = (e) => (/* @__PURE__ */ new Date(Date.now() - e * T)).toISOString(), D = (e, t = {}) => ({
34
+ ...C(S, e, null),
35
+ submittedAt: E(5),
36
+ updatedAt: E(e === "DENIED" ? 2 : 5),
35
37
  ...t
36
- }), D = ({ draft: a, approves: d, others: f = [], settled: p, failsFirstSubmit: b = !1 }) => () => {
37
- let x = a ?? null, C = p?.(), w = 0, T = "DRAFT", E = 0, D = "cs_demo_application_secret", k = () => C ? [C, ...f] : x ? (T === "SUBMITTED" && d && (E += 1, E > 2 && (T = "COMPLETE")), [S(x, T, T === "DRAFT" ? D : null), ...f]) : f;
38
+ }), O = ({ draft: o, approves: f, others: p = [], settled: m, failsFirstSubmit: x = !1 }) => () => {
39
+ let S = o ?? null, w = m?.(), T = 0, E = "DRAFT", D = 0, O = "cs_demo_application_secret", A = () => w ? [w, ...p] : S ? (E === "SUBMITTED" && f && (D += 1, D > 2 && (E = "COMPLETE")), [C(S, E, E === "DRAFT" ? O : null), ...p]) : p;
38
40
  return [
39
- (e) => s([], T === "COMPLETE" ? y : v)(e),
40
- o("GET", g, () => c({ applications: k() })),
41
- o("GET", `${i}/disclosures`, () => c(n)),
42
- o("POST", _, () => c(r)),
43
- o("POST", m, () => (x = e, T = "DRAFT", c({
44
- ...x,
45
- clientSecret: D
41
+ (e) => c([], E === "COMPLETE" ? b : y)(e),
42
+ s("GET", _, () => l({ applications: A() })),
43
+ s("GET", e, u),
44
+ s("GET", `${a}/disclosures`, () => l(r)),
45
+ s("POST", v, () => l(i)),
46
+ s("POST", h, () => (S = t, E = "DRAFT", l({
47
+ ...S,
48
+ clientSecret: O
46
49
  }, 201))),
47
- o("GET", h, () => x ? c(x) : O()),
48
- o("PATCH", h, () => x ? c(x) : O()),
49
- o("POST", `${h}/submission`, () => x ? (w += 1, b && w === 1 ? u(503, "Service Unavailable", "The application could not be submitted right now.") : (T = "SUBMITTED", E = 0, c({
50
- ...x,
51
- status: T,
52
- submittedAt: t.submittedAt
53
- }))) : O()),
54
- o("DELETE", h, () => (T = "DELETED", l()))
50
+ s("GET", g, () => S ? l(S) : k()),
51
+ s("PATCH", g, () => S ? l(S) : k()),
52
+ s("POST", `${g}/submission`, () => S ? (T += 1, x && T === 1 ? d(503, "Service Unavailable", "The application could not be submitted right now.") : (E = "SUBMITTED", D = 0, l({
53
+ ...S,
54
+ status: E,
55
+ submittedAt: n.submittedAt
56
+ }))) : k()),
57
+ s("DELETE", g, () => (E = "DELETED", u()))
55
58
  ];
56
- }, O = () => u(404, "Not Found", "No such bank account application."), k = (e, t) => ({
59
+ }, k = () => d(404, "Not Found", "No such bank account application."), A = (e, t) => ({
57
60
  key: e,
58
- ...p.scenarios[e],
59
- routes: D(t)
60
- }), A = [
61
- k("default", { approves: !0 }),
62
- k("resume-draft", {
63
- draft: x,
61
+ ...m.scenarios[e],
62
+ routes: O(t)
63
+ }), j = [
64
+ A("default", { approves: !0 }),
65
+ A("resume-draft", {
66
+ draft: S,
64
67
  approves: !0
65
68
  }),
66
- k("under-review", {
67
- draft: x,
69
+ A("under-review", {
70
+ draft: S,
68
71
  approves: !1
69
72
  }),
70
- k("colleague-applied", {
73
+ A("colleague-applied", {
71
74
  approves: !0,
72
- others: [C]
75
+ others: [w]
73
76
  }),
74
- k("submit-failed", {
75
- draft: x,
77
+ A("submit-failed", {
78
+ draft: S,
76
79
  approves: !0,
77
80
  failsFirstSubmit: !0
78
81
  }),
79
- k("awaiting-review", {
82
+ A("awaiting-review", {
80
83
  approves: !1,
81
- settled: () => E("SUBMITTED")
84
+ settled: () => D("SUBMITTED")
82
85
  }),
83
- k("denied", {
86
+ A("denied", {
84
87
  approves: !1,
85
- settled: () => E("DENIED", { deniedAt: T(2) })
88
+ settled: () => D("DENIED", { deniedAt: E(2) })
86
89
  })
87
90
  ];
88
- export { A as bankAccountOnboardingScenarios };
91
+ export { j as bankAccountOnboardingScenarios };
@@ -1,5 +1,5 @@
1
1
  // ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
2
- var e = "@tesouro/embedded-components-react", t = "0.11.223", n = "1ad4a5002413b020f63cee632d0f07732d298771", r = Object.freeze({
2
+ var e = "@tesouro/embedded-components-react", t = "0.11.224", n = "d54952d36b4717a2b9cc9e9428dc8bce1ebb0658", r = Object.freeze({
3
3
  library_name: e,
4
4
  library_version: t,
5
5
  library_sha: n
@@ -33,5 +33,6 @@ import "./lib/theme/toneColors.js";
33
33
  import { createTheme as R, isThemeDevelopmentBuild as z, readThemeTokens as B, reportThemeIssues as V, themeIssues as H, themeToCss as U } from "./lib/theme/createTheme.js";
34
34
  import "./lib/theme/index.js";
35
35
  import { configureCsp as W, installStyleNonce as G } from "./lib/csp.js";
36
- import { resolvePdfWorkerSrc as K } from "./lib/pdfWorkerSrc.js";
37
- export { i as DATE_DISPLAY_LOCALE, a as DATE_DISPLAY_OPTIONS, k as TESOURO_NEW_EMBEDDED_BANK_ACCOUNT_CREATED_SUCCESS_EVENT, A as TESOURO_NEW_EXTERNAL_BANK_ACCOUNT_LINKED_SUCCESS_EVENT, L as THEME_TOKEN_NAMES, T as US_STATE_NAMES_EN, n as amountOutputToMajorUnits, F as buildPayableAuditHistory, P as buildReceivableAuditHistory, e as coerceAmountValueToMinorUnits, W as configureCsp, t as createCurrencyFormatter, R as createTheme, O as createWidgetTokenManager, m as currencySymbolForCode, j as emitWidgetDomEvent, M as extractApiErrorMessage, f as formatAccountingAmount, l as formatCalendarDate, p as formatCompactAmount, h as formatMoneyExact, g as formatPhoneDisplay, d as formatRejectionDate, u as formatTimestampDate, _ as getInitials, S as getRelativeCalendarDay, E as getStateOptions, I as hasUnattributedAuditRows, G as installStyleNonce, D as isStateValid, z as isThemeDevelopmentBuild, v as isValidAchAccountNumber, y as mergeLabelTree, r as minorExponentForCurrency, b as normalizeAmountOutputCurrencyCode, x as parseAmountOutputMajorUnits, N as parseApiValidationErrors, o as parseCalendarDate, s as parseDateOrTimestamp, C as parseDecimalAmountToMinorUnits, B as readThemeTokens, V as reportThemeIssues, c as resolveDueDateDisplay, K as resolvePdfWorkerSrc, w as sumAmountOutputsMajorUnits, H as themeIssues, U as themeToCss };
36
+ import { loadScript as K } from "./lib/loadScript.js";
37
+ import { resolvePdfWorkerSrc as q } from "./lib/pdfWorkerSrc.js";
38
+ export { i as DATE_DISPLAY_LOCALE, a as DATE_DISPLAY_OPTIONS, k as TESOURO_NEW_EMBEDDED_BANK_ACCOUNT_CREATED_SUCCESS_EVENT, A as TESOURO_NEW_EXTERNAL_BANK_ACCOUNT_LINKED_SUCCESS_EVENT, L as THEME_TOKEN_NAMES, T as US_STATE_NAMES_EN, n as amountOutputToMajorUnits, F as buildPayableAuditHistory, P as buildReceivableAuditHistory, e as coerceAmountValueToMinorUnits, W as configureCsp, t as createCurrencyFormatter, R as createTheme, O as createWidgetTokenManager, m as currencySymbolForCode, j as emitWidgetDomEvent, M as extractApiErrorMessage, f as formatAccountingAmount, l as formatCalendarDate, p as formatCompactAmount, h as formatMoneyExact, g as formatPhoneDisplay, d as formatRejectionDate, u as formatTimestampDate, _ as getInitials, S as getRelativeCalendarDay, E as getStateOptions, I as hasUnattributedAuditRows, G as installStyleNonce, D as isStateValid, z as isThemeDevelopmentBuild, v as isValidAchAccountNumber, K as loadScript, y as mergeLabelTree, r as minorExponentForCurrency, b as normalizeAmountOutputCurrencyCode, x as parseAmountOutputMajorUnits, N as parseApiValidationErrors, o as parseCalendarDate, s as parseDateOrTimestamp, C as parseDecimalAmountToMinorUnits, B as readThemeTokens, V as reportThemeIssues, c as resolveDueDateDisplay, q as resolvePdfWorkerSrc, w as sumAmountOutputsMajorUnits, H as themeIssues, U as themeToCss };
@@ -34,4 +34,4 @@ var c = { toString: () => s() ?? "" }, l = !1;
34
34
  function u() {
35
35
  l || (l = !0, e(c));
36
36
  }
37
- export { r as configureCsp, o as findPageNonce, i as getCspConfig, u as installStyleNonce, s as resolveStyleNonce };
37
+ export { r as configureCsp, o as findPageNonce, i as getCspConfig, u as installStyleNonce, s as resolveCspNonce };
@@ -0,0 +1,17 @@
1
+ import { resolveCspNonce as e } from "./csp.js";
2
+ // ../../libs/tesouro-embedded-components-react/shared/util/dist/lib/loadScript.js
3
+ var t = /* @__PURE__ */ new Map();
4
+ function n(n) {
5
+ let r = t.get(n);
6
+ if (r) return r;
7
+ let i = new Promise((r, i) => {
8
+ let a = document.createElement("script");
9
+ a.src = n, a.async = !0;
10
+ let o = e();
11
+ o && (a.nonce = o), a.onload = () => r(), a.onerror = () => {
12
+ t.delete(n), a.remove(), i(/* @__PURE__ */ Error(`Failed to load ${n}`));
13
+ }, document.head.appendChild(a);
14
+ });
15
+ return t.set(n, i), i;
16
+ }
17
+ export { n as loadScript };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tesouro/embedded-components-react",
3
- "version": "0.11.223",
3
+ "version": "0.11.224",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "sideEffects": [