@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.
- package/dist/index.d.ts +56 -2
- package/dist/index.js +13 -12
- package/dist/lib/BankAccountOnboardingWidget.d.ts +56 -2
- package/dist/lib/BankAccountOnboardingWidget.js +4 -3
- package/dist/lib/MarketingWidget.js +1 -1
- package/dist/lib/WidgetSuite.d.ts +53 -0
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index.js +3 -2
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index11.js +72 -72
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index12.js +4 -1
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index13.js +15 -15
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index14.js +60 -60
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index15.js +12 -12
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index16.js +16 -16
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index18.js +11 -11
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index21.js +8 -8
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index22.js +71 -5
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index23.js +95 -33
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index24.js +6 -17
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index25.js +16 -616
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index26.js +669 -0
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index.js +15 -13
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index10.js +52 -37
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index11.js +31 -37
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index12.js +33 -89
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index13.js +39 -12
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index14.js +98 -2
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index15.js +14 -4
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index16.js +2 -185
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index17.js +4 -30
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index18.js +183 -21
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index19.js +26 -66
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index20.js +21 -233
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index21.js +66 -27
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index22.js +233 -26
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index23.js +27 -72
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index24.js +26 -85
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index25.js +74 -8
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index26.js +83 -55
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index27.js +6 -7
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index28.js +37 -42
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index29.js +11 -0
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index30.js +64 -0
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index9.js +7 -33
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index22.js +3 -1
- package/dist/libs/tesouro-embedded-components-react/marketing-widget/feature/dist/index.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/marketing-widget/feature/dist/index5.js +16 -19
- package/dist/libs/tesouro-embedded-components-react/marketing-widget/feature/dist/index6.js +157 -16
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/onboardingSuppressionReason.js +3 -1
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/index.js +2 -1
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/application/bankAccountApplication.js +26 -0
- package/dist/libs/tesouro-embedded-components-react/shared/util/dist/lib/auditHistory/buildPayableAuditHistory.js +54 -36
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index16.js +1 -1
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/marketing-widget/feature/dist/index7.js +0 -161
package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index9.js
CHANGED
|
@@ -1,35 +1,9 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use client";
|
|
3
|
-
"use client";
|
|
4
|
-
"use client";
|
|
5
|
-
import * as e from "react";
|
|
6
|
-
import { jsx as t } from "react/jsx-runtime";
|
|
7
|
-
import n from "react-confetti";
|
|
8
1
|
//#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index9.js
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
let e = () => {
|
|
16
|
-
i({
|
|
17
|
-
width: window.innerWidth,
|
|
18
|
-
height: window.innerHeight
|
|
19
|
-
});
|
|
20
|
-
};
|
|
21
|
-
return window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
|
|
22
|
-
}, []), /* @__PURE__ */ t(n, {
|
|
23
|
-
width: r.width,
|
|
24
|
-
height: r.height,
|
|
25
|
-
recycle: !1,
|
|
26
|
-
gravity: .6,
|
|
27
|
-
numberOfPieces: 400,
|
|
28
|
-
initialVelocityY: {
|
|
29
|
-
min: 10,
|
|
30
|
-
max: 12
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
}
|
|
2
|
+
var e = {
|
|
3
|
+
title: "Business bank account application",
|
|
4
|
+
bankDisclosure: "",
|
|
5
|
+
chipLabel: "Application status",
|
|
6
|
+
body: []
|
|
7
|
+
};
|
|
34
8
|
//#endregion
|
|
35
|
-
export {
|
|
9
|
+
export { e as APPLICATION_STATUS_CARD_LABELS_EN };
|
|
@@ -16,8 +16,10 @@ var t = {
|
|
|
16
16
|
billCreated: "Bill created",
|
|
17
17
|
createdManually: "Data entered manually",
|
|
18
18
|
createdFromUpload: "File uploaded and scanned automatically",
|
|
19
|
-
|
|
19
|
+
billCreatedByEmail: "Bill created by email",
|
|
20
|
+
sentFrom: (e) => `Sent from ${e}`,
|
|
20
21
|
billDetailsUpdated: "Bill details updated",
|
|
22
|
+
filledInFromFile: "Filled in from the attached file",
|
|
21
23
|
submittedForReview: "Finalized and submitted for review",
|
|
22
24
|
approvalRequested: "Approval requested",
|
|
23
25
|
approved: "Approved",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MARKETING_WIDGET_STATUS_LABELS_EN as e } from "./index4.js";
|
|
2
2
|
import { MARKETING_WIDGET_LABELS_EN as t } from "../../ui/dist/index2.js";
|
|
3
3
|
import { MarketingBenefitIcon as n } from "../../ui/dist/index3.js";
|
|
4
|
-
import { MarketingWidget as r } from "./
|
|
4
|
+
import { MarketingWidget as r } from "./index6.js";
|
|
5
5
|
export { t as MARKETING_WIDGET_LABELS_EN, e as MARKETING_WIDGET_STATUS_LABELS_EN, n as MarketingBenefitIcon, r as MarketingWidget };
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { deniedNoticeExpiresAt as e } from "../../../shared/feature/dist/lib/application/bankAccountApplication.js";
|
|
2
|
+
import "../../../shared/feature/dist/index.js";
|
|
1
3
|
//#region ../../libs/tesouro-embedded-components-react/marketing-widget/feature/dist/index5.js
|
|
2
|
-
var
|
|
4
|
+
var t = {
|
|
3
5
|
Offer: "offer",
|
|
4
6
|
Resume: "resume",
|
|
5
7
|
DraftStartedByOther: "draftStartedByOther",
|
|
@@ -8,27 +10,22 @@ var e = {
|
|
|
8
10
|
DeniedByYou: "deniedByYou",
|
|
9
11
|
DeniedByOther: "deniedByOther",
|
|
10
12
|
Hidden: "hidden"
|
|
11
|
-
}
|
|
12
|
-
function n(
|
|
13
|
-
if (
|
|
14
|
-
let
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
let i = t.ownership === "STARTED_BY_YOU";
|
|
20
|
-
switch (t.status) {
|
|
21
|
-
case "COMPLETE": return e.Hidden;
|
|
22
|
-
case "DRAFT": return i ? e.Resume : e.DraftStartedByOther;
|
|
23
|
-
case "SUBMITTED": return i ? e.SubmittedByYou : e.SubmittedByOther;
|
|
13
|
+
};
|
|
14
|
+
function n(n, r = Date.now()) {
|
|
15
|
+
if (!n) return t.Offer;
|
|
16
|
+
let i = n.ownership === "STARTED_BY_YOU";
|
|
17
|
+
switch (n.status) {
|
|
18
|
+
case "COMPLETE": return t.Hidden;
|
|
19
|
+
case "DRAFT": return i ? t.Resume : t.DraftStartedByOther;
|
|
20
|
+
case "SUBMITTED": return i ? t.SubmittedByYou : t.SubmittedByOther;
|
|
24
21
|
case "DENIED": {
|
|
25
|
-
let a = n
|
|
26
|
-
return a !== null && r > a ?
|
|
22
|
+
let a = e(n);
|
|
23
|
+
return a !== null && r > a ? t.Hidden : i ? t.DeniedByYou : t.DeniedByOther;
|
|
27
24
|
}
|
|
28
25
|
case "DELETED":
|
|
29
|
-
case "CANCELED": return
|
|
30
|
-
default: return
|
|
26
|
+
case "CANCELED": return t.Offer;
|
|
27
|
+
default: return t.Hidden;
|
|
31
28
|
}
|
|
32
29
|
}
|
|
33
30
|
//#endregion
|
|
34
|
-
export { t as
|
|
31
|
+
export { t as MarketingApplicationView, n as marketingApplicationViewFor };
|
|
@@ -1,20 +1,161 @@
|
|
|
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 { deniedNoticeExpiresAt as a, selectBankAccountApplication as o } from "../../../shared/feature/dist/lib/application/bankAccountApplication.js";
|
|
11
|
+
import "../../../shared/feature/dist/index.js";
|
|
12
|
+
import { MARKETING_WIDGET_STATUS_LABELS_EN as s } from "./index4.js";
|
|
13
|
+
import { MarketingWidgetAnalyticsEvent as c, WIDGET_NAME as l } from "./index2.js";
|
|
14
|
+
import { marketingWidgetTestIds as u } from "./index3.js";
|
|
15
|
+
import { MarketingApplicationView as d, marketingApplicationViewFor as f } from "./index5.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";
|
|
1
22
|
//#region ../../libs/tesouro-embedded-components-react/marketing-widget/feature/dist/index6.js
|
|
2
|
-
var
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
7
|
-
]
|
|
8
|
-
|
|
9
|
-
|
|
23
|
+
var C = 2 ** 31 - 1, w = /* @__PURE__ */ new Set([
|
|
24
|
+
"ACTIVE",
|
|
25
|
+
"INACTIVE",
|
|
26
|
+
"INVITED"
|
|
27
|
+
]), T = {
|
|
28
|
+
[d.DraftStartedByOther]: "draftStartedByOther",
|
|
29
|
+
[d.SubmittedByYou]: "submittedByYou",
|
|
30
|
+
[d.SubmittedByOther]: "submittedByOther",
|
|
31
|
+
[d.DeniedByYou]: "deniedByYou",
|
|
32
|
+
[d.DeniedByOther]: "deniedByOther"
|
|
33
|
+
}, E = {
|
|
34
|
+
[d.DraftStartedByOther]: h.Brand,
|
|
35
|
+
[d.SubmittedByYou]: h.Warning,
|
|
36
|
+
[d.SubmittedByOther]: h.Warning,
|
|
37
|
+
[d.DeniedByYou]: h.Danger,
|
|
38
|
+
[d.DeniedByOther]: h.Danger
|
|
39
|
+
};
|
|
40
|
+
function D(e) {
|
|
41
|
+
return e in T;
|
|
10
42
|
}
|
|
11
|
-
function
|
|
12
|
-
let
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
43
|
+
function O(e) {
|
|
44
|
+
let t = s, 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: s, labels: l, 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(() => o(j.applications), [j.applications]), L = a(I), R = y(() => O(p), [p]), z = f(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 === d.Resume ? {
|
|
85
|
+
...l,
|
|
86
|
+
applyNow: R.resumeApplication,
|
|
87
|
+
primaryCta: R.resumeApplication
|
|
88
|
+
} : l, [
|
|
89
|
+
l,
|
|
90
|
+
R.resumeApplication,
|
|
91
|
+
z
|
|
92
|
+
]);
|
|
93
|
+
v(() => {
|
|
94
|
+
m(c.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 !== d.Hidden;
|
|
103
|
+
M && !U && N(!1);
|
|
104
|
+
let W = _(() => {
|
|
105
|
+
m(c.OpenModal), N(!0);
|
|
106
|
+
}, [m]), G = _(() => {
|
|
107
|
+
N(!1);
|
|
108
|
+
}, []), K = _(() => {
|
|
109
|
+
m(c.PrimaryCta), N(!1), s();
|
|
110
|
+
}, [s, m]);
|
|
111
|
+
return !h?.status || w.has(h.status) || A || !j.isResolved || z === d.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: u.root,
|
|
131
|
+
learnMoreButton: u.learnMoreButton,
|
|
132
|
+
applyNowButton: u.applyNowButton,
|
|
133
|
+
statusMessage: u.statusMessage,
|
|
134
|
+
modal: {
|
|
135
|
+
root: u.modal,
|
|
136
|
+
primaryCtaButton: u.primaryCtaButton
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
function j({ baseUrl: e, widgetToken: t, organizationId: r, configClient: i, gatewayRouting: a, linkComponent: o, implementation: s, uiFramework: c, errorFallback: u, onError: d, analytics: f, disclosuresAcceptance: p, providerLabels: m, ...h }) {
|
|
142
|
+
return /* @__PURE__ */ S(n, {
|
|
143
|
+
widgetName: l,
|
|
144
|
+
baseUrl: e,
|
|
145
|
+
widgetToken: t,
|
|
146
|
+
organizationId: r,
|
|
147
|
+
configClient: i,
|
|
148
|
+
gatewayRouting: a,
|
|
149
|
+
linkComponent: o,
|
|
150
|
+
implementation: s,
|
|
151
|
+
uiFramework: c,
|
|
152
|
+
errorFallback: u,
|
|
153
|
+
onError: d,
|
|
154
|
+
analytics: f,
|
|
155
|
+
disclosuresAcceptance: p,
|
|
156
|
+
providerLabels: m,
|
|
157
|
+
children: /* @__PURE__ */ S(A, { ...h })
|
|
158
|
+
});
|
|
18
159
|
}
|
|
19
160
|
//#endregion
|
|
20
|
-
export {
|
|
161
|
+
export { p as MARKETING_WIDGET_LABELS_EN, s as MARKETING_WIDGET_STATUS_LABELS_EN, m as MarketingBenefitIcon, j as MarketingWidget };
|
|
@@ -3,7 +3,9 @@ var e = {
|
|
|
3
3
|
UserAlreadyOnboarded: "user_already_onboarded",
|
|
4
4
|
UserInvitedToOrganization: "user_invited_to_organization",
|
|
5
5
|
OrganizationApplicationComplete: "organization_application_complete",
|
|
6
|
-
OrganizationApplicationStartedByOther: "organization_application_started_by_other"
|
|
6
|
+
OrganizationApplicationStartedByOther: "organization_application_started_by_other",
|
|
7
|
+
OrganizationApplicationDenialExpired: "organization_application_denial_expired",
|
|
8
|
+
OrganizationApplicationStatusUnrecognized: "organization_application_status_unrecognized"
|
|
7
9
|
};
|
|
8
10
|
//#endregion
|
|
9
11
|
export { e as OnboardingSuppressionReason };
|
|
@@ -17,5 +17,6 @@ import { getNaicsOptions as S } from "./lib/naicsCodeMap.js";
|
|
|
17
17
|
import { useOrganizationUserNames as C } from "./lib/user/useOrganizationUserNames.js";
|
|
18
18
|
import { CardProgram as w } from "./lib/card/cardProgram.js";
|
|
19
19
|
import { CARD_STATUS_LABELS_EN as T, CARD_STATUS_TONE as E, CARD_TYPE_LABELS_EN as D } from "./lib/card/cardPresentation.js";
|
|
20
|
+
import { deniedNoticeExpiresAt as O, selectBankAccountApplication as k } from "./lib/application/bankAccountApplication.js";
|
|
20
21
|
import "./lib/analytics/index.js";
|
|
21
|
-
export { T as CARD_STATUS_LABELS_EN, E as CARD_STATUS_TONE, D as CARD_TYPE_LABELS_EN, w as CardProgram, t as Implementation, m as RefreshingRootWidgetProvider, s as RootWidgetProvider, u as WidgetProvider, d as WidgetTokenRefreshProvider, e as cloneEmbeddedClient, n as getGlobalWidgetConfig, a as getGlobalWidgetInitState, S as getNaicsOptions, r as setGlobalWidgetConfig, o as subscribeToGlobalWidgetInitState, i as updateGlobalWidgetConfig, c as useAnalyticsCaptureException, l as useAnalyticsTrack, h as useDisclosuresAcceptanceSurface, f as useOptionalWidgetToken, C as useOrganizationUserNames, g as useOwnWidgetConfig, _ as useRefetchWidget, v as useWidgetConfig, y as useWidgetError, b as useWidgetInitStaleForToken, x as useWidgetLoading, p as useWidgetToken };
|
|
22
|
+
export { T as CARD_STATUS_LABELS_EN, E as CARD_STATUS_TONE, D as CARD_TYPE_LABELS_EN, w as CardProgram, t as Implementation, m as RefreshingRootWidgetProvider, s as RootWidgetProvider, u as WidgetProvider, d as WidgetTokenRefreshProvider, e as cloneEmbeddedClient, O as deniedNoticeExpiresAt, n as getGlobalWidgetConfig, a as getGlobalWidgetInitState, S as getNaicsOptions, k as selectBankAccountApplication, r as setGlobalWidgetConfig, o as subscribeToGlobalWidgetInitState, i as updateGlobalWidgetConfig, c as useAnalyticsCaptureException, l as useAnalyticsTrack, h as useDisclosuresAcceptanceSurface, f as useOptionalWidgetToken, C as useOrganizationUserNames, g as useOwnWidgetConfig, _ as useRefetchWidget, v as useWidgetConfig, y as useWidgetError, b as useWidgetInitStaleForToken, x as useWidgetLoading, p as useWidgetToken };
|
package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
|
|
2
|
-
var e = "@tesouro/embedded-components-react", t = "0.5.
|
|
2
|
+
var e = "@tesouro/embedded-components-react", t = "0.5.217", n = "0a36acf43bce33711fb23b5a8eb3c7fda67378c1", r = Object.freeze({
|
|
3
3
|
library_name: e,
|
|
4
4
|
library_version: t,
|
|
5
5
|
library_sha: n
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
//#region ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/application/bankAccountApplication.js
|
|
2
|
+
var e = [
|
|
3
|
+
"COMPLETE",
|
|
4
|
+
"SUBMITTED",
|
|
5
|
+
"DRAFT",
|
|
6
|
+
"DENIED"
|
|
7
|
+
], t = /* @__PURE__ */ new Set(["DELETED", "CANCELED"]);
|
|
8
|
+
function n(e) {
|
|
9
|
+
return e.find((e) => e.ownership === "STARTED_BY_YOU") ?? e[0] ?? null;
|
|
10
|
+
}
|
|
11
|
+
function r(r) {
|
|
12
|
+
let i = r.filter((e) => e.product === "BANK_ACCOUNT" && !t.has(e.status));
|
|
13
|
+
for (let t of e) {
|
|
14
|
+
let e = i.filter((e) => e.status === t);
|
|
15
|
+
if (e.length > 0) return n(e);
|
|
16
|
+
}
|
|
17
|
+
return n(i);
|
|
18
|
+
}
|
|
19
|
+
var i = 2592e6;
|
|
20
|
+
function a(e) {
|
|
21
|
+
if (e?.status !== "DENIED") return null;
|
|
22
|
+
let t = Date.parse(e.deniedAt ?? e.updatedAt);
|
|
23
|
+
return Number.isFinite(t) ? t + i : null;
|
|
24
|
+
}
|
|
25
|
+
//#endregion
|
|
26
|
+
export { i as DENIED_NOTICE_DURATION_MS, a as deniedNoticeExpiresAt, r as selectBankAccountApplication };
|
|
@@ -4,16 +4,31 @@ var n = /* @__PURE__ */ new Set(["approve", "approved"]), r = /* @__PURE__ */ ne
|
|
|
4
4
|
function i(e) {
|
|
5
5
|
return typeof e == "string" && e ? e : void 0;
|
|
6
6
|
}
|
|
7
|
-
function a(e
|
|
8
|
-
|
|
7
|
+
function a(e) {
|
|
8
|
+
let t = e.event_data ?? {}, n = t.source_of_payable_data === "ocr" && !!i(t.sender);
|
|
9
|
+
return e.event_type === "payable_created" && (t.payable_source === "email" || n);
|
|
9
10
|
}
|
|
10
|
-
function o(e) {
|
|
11
|
+
function o(e, t) {
|
|
12
|
+
let n = e.event_data ?? {};
|
|
13
|
+
if (a(e)) {
|
|
14
|
+
let e = i(n.sender);
|
|
15
|
+
return {
|
|
16
|
+
title: t.billCreatedByEmail,
|
|
17
|
+
meta: e ? t.sentFrom(e) : void 0
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
return {
|
|
21
|
+
title: t.billCreated,
|
|
22
|
+
meta: n.source_of_payable_data === "ocr" ? t.createdFromUpload : t.createdManually
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
function s(e) {
|
|
11
26
|
return e.is_external === !1 || e.is_external !== !0 && !!e.payment_intent_id;
|
|
12
27
|
}
|
|
13
|
-
function
|
|
28
|
+
function c(e, t) {
|
|
14
29
|
return e === void 0 ? void 0 : t.paid(t.formatAmount(e));
|
|
15
30
|
}
|
|
16
|
-
function
|
|
31
|
+
function l(e, t) {
|
|
17
32
|
let a = e.action, o = e.approval_source === "force", s = i(e.reject_reason), c = s ? t.quotedReason(s) : void 0;
|
|
18
33
|
if (n.has(a)) return {
|
|
19
34
|
title: o ? t.policyOverrideApproved : t.approved,
|
|
@@ -24,37 +39,37 @@ function c(e, t) {
|
|
|
24
39
|
meta: c
|
|
25
40
|
};
|
|
26
41
|
}
|
|
27
|
-
function
|
|
28
|
-
let
|
|
42
|
+
function u(e, t, n, r) {
|
|
43
|
+
let a = e.event_data ?? {};
|
|
29
44
|
switch (e.event_type) {
|
|
30
|
-
case "payable_created": return
|
|
31
|
-
|
|
32
|
-
|
|
45
|
+
case "payable_created": return o(e, t);
|
|
46
|
+
case "payable_updated": return {
|
|
47
|
+
title: t.billDetailsUpdated,
|
|
48
|
+
meta: n.filledByScan ? t.filledInFromFile : void 0
|
|
33
49
|
};
|
|
34
|
-
case "payable_updated": return { title: t.billDetailsUpdated };
|
|
35
50
|
case "submitted_for_approval": return { title: t.submittedForReview };
|
|
36
51
|
case "approval_requested": return { title: t.approvalRequested };
|
|
37
|
-
case "approval_action": return
|
|
52
|
+
case "approval_action": return l(a, t);
|
|
38
53
|
case "auto_approved": return { title: t.approvedAutomatically };
|
|
39
|
-
case "status_changed": return
|
|
54
|
+
case "status_changed": return a.new_status === "canceled" ? { title: t.cancelled } : void 0;
|
|
40
55
|
case "reopened": return { title: t.reopened };
|
|
41
56
|
case "marked_as_paid": return {
|
|
42
|
-
title:
|
|
43
|
-
meta:
|
|
57
|
+
title: s(a) ? t.paymentReleased : t.billMarkedAsFullyPaid,
|
|
58
|
+
meta: c(n.paidIncrement, t)
|
|
44
59
|
};
|
|
45
60
|
case "marked_as_partially_paid": return {
|
|
46
|
-
title:
|
|
47
|
-
meta:
|
|
61
|
+
title: s(a) ? t.paymentReleased : t.billMarkedAsPartiallyPaid,
|
|
62
|
+
meta: c(n.paidIncrement, t)
|
|
48
63
|
};
|
|
49
64
|
case "payment_reverted": return { title: t.paymentReverted };
|
|
50
65
|
case "deleted": return { title: t.draftDeleted };
|
|
51
66
|
case "file_attached": return {
|
|
52
67
|
title: t.fileAttached,
|
|
53
|
-
meta: i(
|
|
68
|
+
meta: i(a.file_name)
|
|
54
69
|
};
|
|
55
70
|
case "file_detached": return {
|
|
56
71
|
title: t.fileRemoved,
|
|
57
|
-
meta: i(
|
|
72
|
+
meta: i(a.file_name)
|
|
58
73
|
};
|
|
59
74
|
case "credit_note_linked": return { title: t.creditNoteLinked };
|
|
60
75
|
case "credit_note_unlinked": return { title: t.creditNoteUnlinked };
|
|
@@ -73,40 +88,43 @@ function l(e, t, n, r) {
|
|
|
73
88
|
default: return;
|
|
74
89
|
}
|
|
75
90
|
}
|
|
76
|
-
function
|
|
91
|
+
function d(e) {
|
|
77
92
|
let t = /* @__PURE__ */ new Map(), n = 0, r = [...e].sort((e, t) => Date.parse(e.timestamp) - Date.parse(t.timestamp));
|
|
78
|
-
for (let e of r) {
|
|
79
|
-
let
|
|
80
|
-
switch (
|
|
93
|
+
for (let [e, i] of r.entries()) {
|
|
94
|
+
let a = i.event_data ?? {};
|
|
95
|
+
switch (i.event_type) {
|
|
96
|
+
case "payable_updated":
|
|
97
|
+
i.recorded_by !== "user" && r[e - 1]?.event_type === "ocr_completed" && t.set(i.id, { filledByScan: !0 });
|
|
98
|
+
break;
|
|
81
99
|
case "marked_as_paid":
|
|
82
100
|
case "marked_as_partially_paid":
|
|
83
101
|
case "payment_reverted": {
|
|
84
|
-
let
|
|
85
|
-
if (typeof
|
|
86
|
-
let
|
|
87
|
-
n =
|
|
102
|
+
let e = a.amount_paid;
|
|
103
|
+
if (typeof e != "number") break;
|
|
104
|
+
let r = e - n;
|
|
105
|
+
n = e, i.event_type !== "payment_reverted" && t.set(i.id, { paidIncrement: r > 0 ? r : e });
|
|
88
106
|
break;
|
|
89
107
|
}
|
|
90
108
|
}
|
|
91
109
|
}
|
|
92
110
|
return t;
|
|
93
111
|
}
|
|
94
|
-
function
|
|
95
|
-
let i =
|
|
112
|
+
function f(e, n, r) {
|
|
113
|
+
let i = d(e);
|
|
96
114
|
return e.flatMap((e) => {
|
|
97
|
-
let
|
|
98
|
-
return
|
|
115
|
+
let o = u(e, r, i.get(e.id) ?? {}, n);
|
|
116
|
+
return o ? [{
|
|
99
117
|
id: e.id,
|
|
100
118
|
dateLabel: r.dateLabel(e.timestamp),
|
|
101
119
|
timeLabel: r.timeLabel(e.timestamp),
|
|
102
|
-
title: t(
|
|
103
|
-
meta:
|
|
120
|
+
title: a(e) ? o.title : t(o.title, e, n, r),
|
|
121
|
+
meta: o.meta
|
|
104
122
|
}] : [];
|
|
105
123
|
});
|
|
106
124
|
}
|
|
107
|
-
function
|
|
125
|
+
function p(t, n, r) {
|
|
108
126
|
let i = new Set(n.map((e) => e.id));
|
|
109
|
-
return t.some((t) => i.has(t.id) && t.recorded_by === "user" && !!t.entity_user_id && !e(t, r));
|
|
127
|
+
return t.some((t) => i.has(t.id) && !a(t) && t.recorded_by === "user" && !!t.entity_user_id && !e(t, r));
|
|
110
128
|
}
|
|
111
129
|
//#endregion
|
|
112
|
-
export {
|
|
130
|
+
export { f as buildPayableAuditHistory, p as hasUnattributedAuditRows };
|
|
@@ -24,7 +24,7 @@ import { WIDGET_NAME as b, WidgetSuiteAnalyticsEvent as x } from "./index2.js";
|
|
|
24
24
|
import { needsDisclosureAcceptance as S } from "./index3.js";
|
|
25
25
|
import { AcceptDisclosuresWidget as C } from "../../../accept-disclosures-widget/feature/dist/index5.js";
|
|
26
26
|
import "../../../accept-disclosures-widget/feature/dist/index.js";
|
|
27
|
-
import { BankAccountOnboardingWidget as w } from "../../../bank-account-onboarding-widget/feature/dist/
|
|
27
|
+
import { BankAccountOnboardingWidget as w } from "../../../bank-account-onboarding-widget/feature/dist/index26.js";
|
|
28
28
|
import "../../../bank-account-onboarding-widget/feature/dist/index.js";
|
|
29
29
|
import { useCallback as T, useEffect as E, useMemo as D, useRef as O, useState as k } from "react";
|
|
30
30
|
import { Fragment as A, jsx as j, jsxs as M } from "react/jsx-runtime";
|