@tesouro/embedded-components-react 0.11.116 → 0.11.118
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.css +81 -120
- package/dist/index.d.ts +4 -0
- package/dist/lib/AcceptDisclosuresWidget.d.ts +4 -0
- package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/lib/AcceptDisclosuresWidget/AcceptDisclosuresWidget.js +91 -88
- package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/ui/dist/lib/AcceptDisclosuresWidget/AcceptDisclosuresWidget.js +41 -59
- package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/ui/dist/lib/AcceptDisclosuresWidget/labels.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/AdditionalOwnersStep.js +7 -5
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/BankAccountOnboardingWidget.js +163 -160
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/BusinessDetailsStep.js +18 -18
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/PersonalDetailsStep.js +25 -25
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/additionalOwnerDraft.js +34 -31
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/applicationStatusView.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/fieldInput/maxBirthDate.js +3 -2
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/personalDetailsPanelMapping.js +21 -18
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/testIds.js +3 -0
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index11.js +382 -275
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index12.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index13.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index15.js +37 -42
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index19.js +56 -50
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index2.js +32 -69
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index21.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index22.js +14 -25
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index24.js +36 -39
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index25.js +120 -116
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index26.js +14 -26
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index27.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index28.js +41 -44
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index29.js +96 -115
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index3.js +14 -14
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index31.js +35 -57
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index33.js +37 -60
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index35.js +28 -42
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index4.js +266 -259
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index5.js +51 -55
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index6.js +42 -48
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index7.js +69 -70
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index9.js +2 -2
- 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/ui/dist/index.js +3 -2
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/ConsentBlock/ConsentBlock.js +51 -0
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/EmptyState/EmptyState.js +5 -3
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/InlineErrorAlert/InlineErrorAlert.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/OnboardingShell.js +84 -87
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/OnboardingShellScrollRegion.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/OnboardingShellStepper.js +35 -21
- package/dist/packages/shared-ui-shadcn/dist/index.js +29 -85
- package/package.json +1 -1
|
@@ -2,151 +2,154 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
5
|
+
import { toast as e } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
|
+
import { personDisclosure as t } from "../../../../../shared/data-access/dist/lib/disclosures/personDisclosure.js";
|
|
7
|
+
import { useAcceptWidgetDisclosures as n } from "../../../../../shared/data-access/dist/lib/disclosures/useAcceptWidgetDisclosures.js";
|
|
8
|
+
import { useDisclosuresQuery as r } from "../../../../../shared/data-access/dist/lib/disclosures/useDisclosuresQuery.js";
|
|
9
|
+
import { EmbeddedToaster as i } from "../../../../../shared/ui/dist/lib/EmbeddedToaster.js";
|
|
10
|
+
import { ErrorState as a } from "../../../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
|
|
9
11
|
import "../../../../../shared/ui/dist/index.js";
|
|
10
|
-
import { useAnalyticsTrack as
|
|
11
|
-
import { WidgetProvider as
|
|
12
|
-
import { useRefetchWidget as
|
|
12
|
+
import { useAnalyticsTrack as o } from "../../../../../shared/feature/dist/lib/analytics/hooks.js";
|
|
13
|
+
import { WidgetProvider as s } from "../../../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
|
|
14
|
+
import { useRefetchWidget as c, useWidgetConfig as l, useWidgetInitStaleForToken as u } from "../../../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
13
15
|
import "../../../../../shared/feature/dist/index.js";
|
|
14
|
-
import { AcceptDisclosuresWidgetAnalyticsEvent as
|
|
15
|
-
import { mergeAcceptDisclosuresWidgetLabels as
|
|
16
|
-
import { AcceptDisclosuresWidget as
|
|
16
|
+
import { AcceptDisclosuresWidgetAnalyticsEvent as d, WIDGET_NAME as f } from "../analytics/events.js";
|
|
17
|
+
import { mergeAcceptDisclosuresWidgetLabels as p } from "../../../../ui/dist/lib/AcceptDisclosuresWidget/labels.js";
|
|
18
|
+
import { AcceptDisclosuresWidget as m } from "../../../../ui/dist/lib/AcceptDisclosuresWidget/AcceptDisclosuresWidget.js";
|
|
17
19
|
import "../../../../ui/dist/index.js";
|
|
18
|
-
import { resolveAcceptDisclosuresContent as
|
|
19
|
-
import { acceptDisclosuresWidgetTestIds as
|
|
20
|
+
import { resolveAcceptDisclosuresContent as h } from "./resolveAcceptDisclosuresContent.js";
|
|
21
|
+
import { acceptDisclosuresWidgetTestIds as g } from "./testIds.js";
|
|
20
22
|
import "../../../../data-access/dist/index.js";
|
|
21
|
-
import { useCallback as
|
|
22
|
-
import { Fragment as
|
|
23
|
+
import { useCallback as _, useEffect as v, useRef as y, useState as b } from "react";
|
|
24
|
+
import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
23
25
|
// ../../libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/lib/AcceptDisclosuresWidget/AcceptDisclosuresWidget.js
|
|
24
|
-
function
|
|
25
|
-
return /* @__PURE__ */ x
|
|
26
|
+
function w(e, t, n) {
|
|
27
|
+
return /* @__PURE__ */ C(x, { children: [
|
|
26
28
|
n.providerAttributionPrefix,
|
|
27
|
-
/* @__PURE__ */
|
|
29
|
+
/* @__PURE__ */ S("strong", { children: e }),
|
|
28
30
|
n.providerAttributionMiddle,
|
|
29
31
|
t,
|
|
30
32
|
n.providerAttributionSuffix
|
|
31
33
|
] });
|
|
32
34
|
}
|
|
33
|
-
function
|
|
34
|
-
let
|
|
35
|
-
if (
|
|
36
|
-
|
|
37
|
-
}, [
|
|
35
|
+
function T({ labels: e, onAccepted: n }) {
|
|
36
|
+
let s = o(), { initResponse: c } = l(), f = u(), m = p(e), { data: g, isError: _, refetch: y } = r({ userId: c?.userId ?? void 0 });
|
|
37
|
+
if (v(() => {
|
|
38
|
+
s(d.Mounted);
|
|
39
|
+
}, [s]), _) return /* @__PURE__ */ S(a, {
|
|
38
40
|
title: m.loadErrorTitle,
|
|
39
41
|
description: m.loadErrorFallback,
|
|
40
42
|
retryLabel: m.loadErrorRetryLabel,
|
|
41
43
|
onRetry: () => {
|
|
42
|
-
|
|
44
|
+
y();
|
|
43
45
|
},
|
|
44
46
|
testId: "accept-disclosures-load-error"
|
|
45
47
|
});
|
|
46
|
-
let
|
|
47
|
-
documents:
|
|
48
|
-
vspName:
|
|
49
|
-
bankName:
|
|
50
|
-
labels:
|
|
48
|
+
let b = t(g), w = h({
|
|
49
|
+
documents: g ? b?.documents ?? [] : void 0,
|
|
50
|
+
vspName: c?.vspName,
|
|
51
|
+
bankName: c?.bankName,
|
|
52
|
+
labels: e
|
|
51
53
|
});
|
|
52
|
-
if (!
|
|
53
|
-
let
|
|
54
|
+
if (!w) return null;
|
|
55
|
+
let T = b?.disclosureId ?? null;
|
|
54
56
|
if (f) return null;
|
|
55
|
-
let
|
|
56
|
-
return /* @__PURE__ */
|
|
57
|
-
displayedVersion:
|
|
58
|
-
labelOverrides:
|
|
59
|
-
content:
|
|
57
|
+
let D = `${`user:${c?.userId ?? ""}`}:${T}:${w.vspName}:${w.bankName}:${w.agreementText}:${w.disclosureLinks.map((e) => e.href).join("|")}`;
|
|
58
|
+
return /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(i, {}), /* @__PURE__ */ S(E, {
|
|
59
|
+
displayedVersion: T,
|
|
60
|
+
labelOverrides: e,
|
|
61
|
+
content: w,
|
|
60
62
|
labels: m,
|
|
61
|
-
onAccepted:
|
|
62
|
-
onDisclosuresVersionChanged:
|
|
63
|
-
},
|
|
63
|
+
onAccepted: n,
|
|
64
|
+
onDisclosuresVersionChanged: y
|
|
65
|
+
}, D)] });
|
|
64
66
|
}
|
|
65
|
-
function
|
|
66
|
-
let [
|
|
67
|
-
|
|
68
|
-
}, []),
|
|
69
|
-
if (!(!
|
|
70
|
-
|
|
67
|
+
function E({ displayedVersion: t, labelOverrides: r, content: i, labels: a, onAccepted: o, onDisclosuresVersionChanged: s }) {
|
|
68
|
+
let [l, u] = b(!1), [d, f] = b(), [p, h] = b(!1), [v, x] = b(!1), C = y(!1), { mutateAsync: T } = n(), E = c(), D = _((e) => {
|
|
69
|
+
f(void 0), u(e);
|
|
70
|
+
}, []), O = _(async () => {
|
|
71
|
+
if (!(!l || p || v)) {
|
|
72
|
+
f(void 0), h(!0);
|
|
71
73
|
try {
|
|
72
74
|
if (!C.current) try {
|
|
73
|
-
await
|
|
75
|
+
await T({ displayedVersion: t }), C.current = !0;
|
|
74
76
|
} catch (e) {
|
|
75
77
|
if (e instanceof Error && e.name === "DisclosuresVersionChangedError") {
|
|
76
|
-
|
|
78
|
+
f(a.disclosuresUpdatedFallback), s();
|
|
77
79
|
return;
|
|
78
80
|
}
|
|
79
|
-
|
|
81
|
+
f(a.acceptErrorFallback);
|
|
80
82
|
return;
|
|
81
83
|
}
|
|
82
84
|
try {
|
|
83
|
-
await
|
|
85
|
+
await o?.();
|
|
84
86
|
} catch {
|
|
85
|
-
|
|
87
|
+
f(a.continuationErrorFallback);
|
|
86
88
|
return;
|
|
87
89
|
}
|
|
88
|
-
|
|
90
|
+
E(), x(!0), e.success(a.successToast);
|
|
89
91
|
} finally {
|
|
90
|
-
|
|
92
|
+
h(!1);
|
|
91
93
|
}
|
|
92
94
|
}
|
|
93
95
|
}, [
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
96
|
+
T,
|
|
97
|
+
t,
|
|
98
|
+
v,
|
|
99
|
+
l,
|
|
98
100
|
p,
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
a,
|
|
101
|
+
a.acceptErrorFallback,
|
|
102
|
+
a.continuationErrorFallback,
|
|
103
|
+
a.successToast,
|
|
104
|
+
a.disclosuresUpdatedFallback,
|
|
105
|
+
o,
|
|
103
106
|
s,
|
|
104
|
-
|
|
107
|
+
E
|
|
105
108
|
]);
|
|
106
|
-
return /* @__PURE__ */
|
|
109
|
+
return /* @__PURE__ */ S(m, {
|
|
107
110
|
labels: {
|
|
108
|
-
...
|
|
109
|
-
title:
|
|
110
|
-
agreementCheckboxAriaLabel:
|
|
111
|
+
...r,
|
|
112
|
+
title: i.title,
|
|
113
|
+
agreementCheckboxAriaLabel: i.agreementCheckboxAriaLabel
|
|
111
114
|
},
|
|
112
|
-
providerAttribution:
|
|
113
|
-
agreementText:
|
|
114
|
-
disclosureLinks:
|
|
115
|
-
isAgreed:
|
|
116
|
-
onAgreedChange:
|
|
115
|
+
providerAttribution: w(i.vspName, i.bankName, a),
|
|
116
|
+
agreementText: i.agreementText,
|
|
117
|
+
disclosureLinks: i.disclosureLinks,
|
|
118
|
+
isAgreed: l,
|
|
119
|
+
onAgreedChange: D,
|
|
117
120
|
onAccept: () => {
|
|
118
|
-
|
|
121
|
+
O();
|
|
119
122
|
},
|
|
120
123
|
isSubmitting: p,
|
|
121
|
-
isAccepted:
|
|
122
|
-
errorMessage:
|
|
124
|
+
isAccepted: v,
|
|
125
|
+
errorMessage: d,
|
|
123
126
|
testIds: {
|
|
124
|
-
root:
|
|
125
|
-
providerAttribution:
|
|
126
|
-
disclosureLinks:
|
|
127
|
-
agreeCheckbox:
|
|
128
|
-
agreementText:
|
|
129
|
-
acceptButton:
|
|
130
|
-
error:
|
|
127
|
+
root: g.root,
|
|
128
|
+
providerAttribution: g.providerAttribution,
|
|
129
|
+
disclosureLinks: g.disclosureLinks,
|
|
130
|
+
agreeCheckbox: g.agreeCheckbox,
|
|
131
|
+
agreementText: g.agreementText,
|
|
132
|
+
acceptButton: g.acceptButton,
|
|
133
|
+
error: g.error
|
|
131
134
|
}
|
|
132
135
|
});
|
|
133
136
|
}
|
|
134
|
-
function
|
|
135
|
-
return /* @__PURE__ */
|
|
136
|
-
widgetName:
|
|
137
|
+
function D({ baseUrl: e, widgetToken: t, organizationId: n, configClient: r, gatewayRouting: i, linkComponent: a, uiFramework: o, errorFallback: c, onError: l, analytics: u, disclosuresAcceptance: d, providerLabels: p, ...m }) {
|
|
138
|
+
return /* @__PURE__ */ S(s, {
|
|
139
|
+
widgetName: f,
|
|
137
140
|
baseUrl: e,
|
|
138
141
|
widgetToken: t,
|
|
139
142
|
organizationId: n,
|
|
140
143
|
configClient: r,
|
|
141
144
|
gatewayRouting: i,
|
|
142
|
-
linkComponent:
|
|
143
|
-
uiFramework:
|
|
145
|
+
linkComponent: a,
|
|
146
|
+
uiFramework: o,
|
|
144
147
|
errorFallback: c,
|
|
145
148
|
onError: l,
|
|
146
|
-
analytics:
|
|
147
|
-
disclosuresAcceptance:
|
|
149
|
+
analytics: u,
|
|
150
|
+
disclosuresAcceptance: d,
|
|
148
151
|
providerLabels: p,
|
|
149
|
-
children: /* @__PURE__ */
|
|
152
|
+
children: /* @__PURE__ */ S(T, { ...m })
|
|
150
153
|
});
|
|
151
154
|
}
|
|
152
|
-
export {
|
|
155
|
+
export { D as AcceptDisclosuresWidget };
|
|
@@ -1,72 +1,54 @@
|
|
|
1
|
-
import { Button as e
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
1
|
+
import { Button as e } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { WidgetFrame as t } from "../../../../../shared/ui/dist/lib/WidgetFrame/WidgetFrame.js";
|
|
3
|
+
import { ConsentBlock as n } from "../../../../../shared/ui/dist/lib/ConsentBlock/ConsentBlock.js";
|
|
4
|
+
import "../../../../../shared/ui/dist/index.js";
|
|
5
|
+
import { mergeAcceptDisclosuresWidgetLabels as r } from "./labels.js";
|
|
6
|
+
import { useId as i } from "react";
|
|
7
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
5
8
|
// ../../libs/tesouro-embedded-components-react/accept-disclosures-widget/ui/dist/lib/AcceptDisclosuresWidget/AcceptDisclosuresWidget.js
|
|
6
|
-
function
|
|
7
|
-
let
|
|
8
|
-
return /* @__PURE__ */
|
|
9
|
-
"data-testid":
|
|
10
|
-
|
|
9
|
+
function s({ providerAttribution: s, agreementText: c, disclosureLinks: l, isAgreed: u, onAgreedChange: d, onAccept: f, isSubmitting: p = !1, isAccepted: m = !1, errorMessage: h, labels: g, testIds: _ }) {
|
|
10
|
+
let v = p || m, y = r(g), b = `${i()}-accept-error`;
|
|
11
|
+
return /* @__PURE__ */ o(t, {
|
|
12
|
+
"data-testid": _?.root,
|
|
13
|
+
title: y.title,
|
|
14
|
+
bodyClassName: "ttw:gap-4",
|
|
11
15
|
children: [
|
|
12
|
-
/* @__PURE__ */
|
|
13
|
-
|
|
14
|
-
children: v.title
|
|
15
|
-
}),
|
|
16
|
-
/* @__PURE__ */ i("p", {
|
|
17
|
-
"data-testid": g?.providerAttribution,
|
|
16
|
+
/* @__PURE__ */ a("p", {
|
|
17
|
+
"data-testid": _?.providerAttribution,
|
|
18
18
|
className: "ttw:mb-4 ttw:text-sm ttw:text-foreground",
|
|
19
|
-
children:
|
|
19
|
+
children: s
|
|
20
20
|
}),
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}, e.href))
|
|
34
|
-
}) : null,
|
|
35
|
-
/* @__PURE__ */ a("div", {
|
|
36
|
-
className: "ttw:mb-4 ttw:flex ttw:items-start ttw:gap-3",
|
|
37
|
-
children: [/* @__PURE__ */ i(t, {
|
|
38
|
-
id: b,
|
|
39
|
-
"data-testid": g?.agreeCheckbox,
|
|
40
|
-
checked: l,
|
|
41
|
-
disabled: _,
|
|
42
|
-
onCheckedChange: (e) => u(e === !0),
|
|
43
|
-
"aria-label": v.agreementCheckboxAriaLabel,
|
|
44
|
-
"aria-describedby": x,
|
|
45
|
-
className: "ttw:mt-1 ttw:shrink-0"
|
|
46
|
-
}), /* @__PURE__ */ i("p", {
|
|
47
|
-
id: x,
|
|
48
|
-
"data-testid": g?.agreementText,
|
|
49
|
-
className: "ttw:text-sm ttw:font-normal ttw:leading-relaxed ttw:text-foreground",
|
|
50
|
-
children: s
|
|
51
|
-
})]
|
|
21
|
+
/* @__PURE__ */ a(n, {
|
|
22
|
+
links: l,
|
|
23
|
+
agreement: c,
|
|
24
|
+
checked: u,
|
|
25
|
+
disabled: v,
|
|
26
|
+
onCheckedChange: d,
|
|
27
|
+
checkboxAriaLabel: y.agreementCheckboxAriaLabel,
|
|
28
|
+
testIds: {
|
|
29
|
+
links: _?.disclosureLinks,
|
|
30
|
+
checkbox: _?.agreeCheckbox,
|
|
31
|
+
agreement: _?.agreementText
|
|
32
|
+
}
|
|
52
33
|
}),
|
|
53
|
-
/* @__PURE__ */
|
|
34
|
+
/* @__PURE__ */ a(e, {
|
|
35
|
+
className: "ttw:self-end",
|
|
54
36
|
type: "button",
|
|
55
|
-
"data-testid":
|
|
56
|
-
disabled: !
|
|
57
|
-
"aria-busy":
|
|
58
|
-
"aria-describedby":
|
|
59
|
-
onClick:
|
|
60
|
-
children:
|
|
37
|
+
"data-testid": _?.acceptButton,
|
|
38
|
+
disabled: !u || v,
|
|
39
|
+
"aria-busy": p || void 0,
|
|
40
|
+
"aria-describedby": h ? b : void 0,
|
|
41
|
+
onClick: f,
|
|
42
|
+
children: p ? y.submittingButton : y.acceptButton
|
|
61
43
|
}),
|
|
62
|
-
|
|
63
|
-
id:
|
|
64
|
-
"data-testid":
|
|
44
|
+
h ? /* @__PURE__ */ a("p", {
|
|
45
|
+
id: b,
|
|
46
|
+
"data-testid": _?.error,
|
|
65
47
|
role: "alert",
|
|
66
48
|
className: "ttw:mt-3 ttw:text-sm ttw:text-destructive",
|
|
67
|
-
children:
|
|
49
|
+
children: h
|
|
68
50
|
}) : null
|
|
69
51
|
]
|
|
70
52
|
});
|
|
71
53
|
}
|
|
72
|
-
export {
|
|
54
|
+
export { s as AcceptDisclosuresWidget, r as mergeAcceptDisclosuresWidgetLabels };
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
var e = {
|
|
3
3
|
title: "Review and accept these banking disclosures",
|
|
4
4
|
acceptButton: "Accept",
|
|
5
|
+
submittingButton: "Accepting…",
|
|
6
|
+
successToast: "Disclosures accepted",
|
|
5
7
|
agreementCheckboxAriaLabel: "Agree to banking disclosures",
|
|
6
8
|
acceptErrorFallback: "Failed to accept disclosures",
|
|
7
9
|
continuationErrorFallback: "Disclosures accepted, but we could not continue. Please try again.",
|
|
@@ -105,7 +105,10 @@ function _({ owners: t, onOwnersChange: h, primaryOwnerName: _, applicantOwnersh
|
|
|
105
105
|
}, Ge = () => {
|
|
106
106
|
if (!k) return;
|
|
107
107
|
let e = D.safeParse(k);
|
|
108
|
-
if (!e.success)
|
|
108
|
+
if (!e.success) {
|
|
109
|
+
q.reset([...p]);
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
109
112
|
let n = {
|
|
110
113
|
...e.data,
|
|
111
114
|
reviewed: !0
|
|
@@ -148,13 +151,12 @@ function _({ owners: t, onOwnersChange: h, primaryOwnerName: _, applicantOwnersh
|
|
|
148
151
|
ownershipPercentage: e
|
|
149
152
|
});
|
|
150
153
|
},
|
|
151
|
-
error: xe || P ? ue(F.share, E) : void 0
|
|
152
|
-
onBlur: () => L(!0)
|
|
154
|
+
error: xe || P ? ue(F.share, E) : void 0
|
|
153
155
|
},
|
|
154
156
|
summary: ie(me, E),
|
|
155
157
|
isValid: g(F.share),
|
|
156
158
|
onSave: () => {
|
|
157
|
-
F
|
|
159
|
+
!F || !g(F.share) ? L(!0) : (y({
|
|
158
160
|
ownsOver25Percent: !0,
|
|
159
161
|
ownershipPercentage: F.share
|
|
160
162
|
}), $());
|
|
@@ -177,7 +179,7 @@ function _({ owners: t, onOwnersChange: h, primaryOwnerName: _, applicantOwnersh
|
|
|
177
179
|
},
|
|
178
180
|
onEdit: () => Ve(U)
|
|
179
181
|
} : null, Qe = k ? {
|
|
180
|
-
fields: re(oe(k, we, { stateOptions: ge }), a(p, k, Ne?.error?.issues, E.requiredFieldError), P ? fe : q.touched,
|
|
182
|
+
fields: re(oe(k, we, { stateOptions: ge }), a(p, k, Ne?.error?.issues, E.requiredFieldError), P ? fe : q.touched, () => void 0),
|
|
181
183
|
display: ae(k, E),
|
|
182
184
|
rowIndex: j,
|
|
183
185
|
showMissingFieldsAlert: j !== null && Z[j] !== void 0,
|