@mxenabled/connect-widget 0.0.11 → 0.0.13
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.es.js +165 -149
- package/dist/index.es.js.map +1 -1
- package/dist/lastBuild.txt +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -52027,9 +52027,30 @@ const RequestInstitution = React__default.forwardRef((props, requestInstitutionR
|
|
|
52027
52027
|
institutionWebsite: "",
|
|
52028
52028
|
institutionLogin: ""
|
|
52029
52029
|
};
|
|
52030
|
+
const schema = {
|
|
52031
|
+
email: {
|
|
52032
|
+
label: __("Your email address"),
|
|
52033
|
+
required: true,
|
|
52034
|
+
pattern: "email"
|
|
52035
|
+
},
|
|
52036
|
+
institutionName: {
|
|
52037
|
+
label: __("Institution name"),
|
|
52038
|
+
required: true
|
|
52039
|
+
},
|
|
52040
|
+
institutionWebsite: {
|
|
52041
|
+
label: __("Institution website"),
|
|
52042
|
+
required: true,
|
|
52043
|
+
pattern: "url"
|
|
52044
|
+
},
|
|
52045
|
+
institutionLogin: {
|
|
52046
|
+
label: __("Institution login page (optional)"),
|
|
52047
|
+
required: false,
|
|
52048
|
+
pattern: "url"
|
|
52049
|
+
}
|
|
52050
|
+
};
|
|
52030
52051
|
const { handleTextInputChange, handleSubmit, values, errors } = useForm(
|
|
52031
52052
|
() => setSubmitting(true),
|
|
52032
|
-
schema
|
|
52053
|
+
schema,
|
|
52033
52054
|
initialForm
|
|
52034
52055
|
);
|
|
52035
52056
|
const tokens = useTokens();
|
|
@@ -52067,10 +52088,11 @@ const RequestInstitution = React__default.forwardRef((props, requestInstitutionR
|
|
|
52067
52088
|
autoComplete: "off",
|
|
52068
52089
|
autoFocus: !user.email,
|
|
52069
52090
|
disabled: submitting,
|
|
52070
|
-
error: errors.email,
|
|
52091
|
+
error: !!errors.email,
|
|
52071
52092
|
fullWidth: true,
|
|
52072
52093
|
helperText: errors.email,
|
|
52073
|
-
|
|
52094
|
+
id: "email",
|
|
52095
|
+
label: schema.email.label,
|
|
52074
52096
|
name: "email",
|
|
52075
52097
|
onChange: handleTextInputChange,
|
|
52076
52098
|
value: values.email
|
|
@@ -52080,12 +52102,13 @@ const RequestInstitution = React__default.forwardRef((props, requestInstitutionR
|
|
|
52080
52102
|
ProtectedTextField,
|
|
52081
52103
|
{
|
|
52082
52104
|
autoComplete: "off",
|
|
52083
|
-
autoFocus: user.email,
|
|
52105
|
+
autoFocus: !!user.email,
|
|
52084
52106
|
disabled: submitting,
|
|
52085
|
-
error: errors.institutionName,
|
|
52107
|
+
error: !!errors.institutionName,
|
|
52086
52108
|
fullWidth: true,
|
|
52087
52109
|
helperText: errors.institutionName,
|
|
52088
|
-
|
|
52110
|
+
id: "institutionName",
|
|
52111
|
+
label: schema.institutionName.label,
|
|
52089
52112
|
name: "institutionName",
|
|
52090
52113
|
onChange: handleTextInputChange,
|
|
52091
52114
|
value: values.institutionName
|
|
@@ -52096,10 +52119,11 @@ const RequestInstitution = React__default.forwardRef((props, requestInstitutionR
|
|
|
52096
52119
|
{
|
|
52097
52120
|
autoComplete: "off",
|
|
52098
52121
|
disabled: submitting,
|
|
52099
|
-
error: errors.institutionWebsite,
|
|
52122
|
+
error: !!errors.institutionWebsite,
|
|
52100
52123
|
fullWidth: true,
|
|
52101
52124
|
helperText: errors.institutionWebsite,
|
|
52102
|
-
|
|
52125
|
+
id: "institutionWebsite",
|
|
52126
|
+
label: schema.institutionWebsite.label,
|
|
52103
52127
|
name: "institutionWebsite",
|
|
52104
52128
|
onChange: handleTextInputChange,
|
|
52105
52129
|
value: values.institutionWebsite
|
|
@@ -52108,13 +52132,14 @@ const RequestInstitution = React__default.forwardRef((props, requestInstitutionR
|
|
|
52108
52132
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: styles.input, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
52109
52133
|
ProtectedTextField,
|
|
52110
52134
|
{
|
|
52111
|
-
"aria-label": schema
|
|
52135
|
+
"aria-label": schema.institutionLogin.label,
|
|
52112
52136
|
autoComplete: "off",
|
|
52113
52137
|
disabled: submitting,
|
|
52114
|
-
error: errors.institutionLogin,
|
|
52138
|
+
error: !!errors.institutionLogin,
|
|
52115
52139
|
fullWidth: true,
|
|
52116
52140
|
helperText: errors.institutionLogin,
|
|
52117
|
-
|
|
52141
|
+
id: "institutionLogin",
|
|
52142
|
+
label: schema.institutionLogin.label,
|
|
52118
52143
|
name: "institutionLogin",
|
|
52119
52144
|
onChange: handleTextInputChange,
|
|
52120
52145
|
value: values.institutionLogin
|
|
@@ -52190,27 +52215,6 @@ RequestInstitution.propTypes = {
|
|
|
52190
52215
|
user: PropTypes$1.object.isRequired
|
|
52191
52216
|
};
|
|
52192
52217
|
RequestInstitution.displayName = "RequestInstitution";
|
|
52193
|
-
const schema$5 = {
|
|
52194
|
-
email: {
|
|
52195
|
-
label: __("Your email address"),
|
|
52196
|
-
required: true,
|
|
52197
|
-
pattern: "email"
|
|
52198
|
-
},
|
|
52199
|
-
institutionName: {
|
|
52200
|
-
label: __("Institution name"),
|
|
52201
|
-
required: true
|
|
52202
|
-
},
|
|
52203
|
-
institutionWebsite: {
|
|
52204
|
-
label: __("Institution website"),
|
|
52205
|
-
required: true,
|
|
52206
|
-
pattern: "url"
|
|
52207
|
-
},
|
|
52208
|
-
institutionLogin: {
|
|
52209
|
-
label: __("Institution login page (optional)"),
|
|
52210
|
-
required: false,
|
|
52211
|
-
pattern: "url"
|
|
52212
|
-
}
|
|
52213
|
-
};
|
|
52214
52218
|
|
|
52215
52219
|
const GeneralSupport = React__default.forwardRef((props, generalSupportRef) => {
|
|
52216
52220
|
const { handleClose, handleTicketSuccess, user } = props;
|
|
@@ -52222,9 +52226,24 @@ const GeneralSupport = React__default.forwardRef((props, generalSupportRef) => {
|
|
|
52222
52226
|
issueDescription: "",
|
|
52223
52227
|
issueDetails: ""
|
|
52224
52228
|
};
|
|
52229
|
+
const schema = {
|
|
52230
|
+
email: {
|
|
52231
|
+
label: __("Your email address"),
|
|
52232
|
+
required: true,
|
|
52233
|
+
pattern: "email"
|
|
52234
|
+
},
|
|
52235
|
+
issueDescription: {
|
|
52236
|
+
label: __("Brief description of the issue"),
|
|
52237
|
+
required: true
|
|
52238
|
+
},
|
|
52239
|
+
issueDetails: {
|
|
52240
|
+
label: __("Details of the issue"),
|
|
52241
|
+
required: true
|
|
52242
|
+
}
|
|
52243
|
+
};
|
|
52225
52244
|
const { handleTextInputChange, handleSubmit, values, errors } = useForm(
|
|
52226
52245
|
() => setSubmitting(true),
|
|
52227
|
-
schema
|
|
52246
|
+
schema,
|
|
52228
52247
|
initialForm
|
|
52229
52248
|
);
|
|
52230
52249
|
const tokens = useTokens();
|
|
@@ -52258,10 +52277,11 @@ const GeneralSupport = React__default.forwardRef((props, generalSupportRef) => {
|
|
|
52258
52277
|
autoComplete: "off",
|
|
52259
52278
|
autoFocus: !user.email,
|
|
52260
52279
|
disabled: submitting,
|
|
52261
|
-
error: errors.email,
|
|
52280
|
+
error: !!errors.email,
|
|
52262
52281
|
fullWidth: true,
|
|
52263
52282
|
helperText: errors.email,
|
|
52264
|
-
|
|
52283
|
+
id: "email",
|
|
52284
|
+
label: schema.email.label,
|
|
52265
52285
|
name: "email",
|
|
52266
52286
|
onChange: handleTextInputChange,
|
|
52267
52287
|
value: values.email
|
|
@@ -52273,10 +52293,11 @@ const GeneralSupport = React__default.forwardRef((props, generalSupportRef) => {
|
|
|
52273
52293
|
autoComplete: "off",
|
|
52274
52294
|
autoFocus: !!user.email,
|
|
52275
52295
|
disabled: submitting,
|
|
52276
|
-
error: errors.issueDescription,
|
|
52296
|
+
error: !!errors.issueDescription,
|
|
52277
52297
|
fullWidth: true,
|
|
52278
52298
|
helperText: errors.issueDescription,
|
|
52279
|
-
|
|
52299
|
+
id: "issueDescription",
|
|
52300
|
+
label: schema.issueDescription.label,
|
|
52280
52301
|
name: "issueDescription",
|
|
52281
52302
|
onChange: handleTextInputChange,
|
|
52282
52303
|
value: values.issueDescription
|
|
@@ -52287,10 +52308,11 @@ const GeneralSupport = React__default.forwardRef((props, generalSupportRef) => {
|
|
|
52287
52308
|
{
|
|
52288
52309
|
autoComplete: "off",
|
|
52289
52310
|
disabled: submitting,
|
|
52290
|
-
error: errors.issueDetails,
|
|
52311
|
+
error: !!errors.issueDetails,
|
|
52291
52312
|
fullWidth: true,
|
|
52292
52313
|
helperText: errors.issueDetails,
|
|
52293
|
-
|
|
52314
|
+
id: "issueDetails",
|
|
52315
|
+
label: schema.issueDetails.label,
|
|
52294
52316
|
multiline: true,
|
|
52295
52317
|
name: "issueDetails",
|
|
52296
52318
|
onChange: handleTextInputChange,
|
|
@@ -52364,21 +52386,6 @@ GeneralSupport.propTypes = {
|
|
|
52364
52386
|
user: PropTypes$1.object.isRequired
|
|
52365
52387
|
};
|
|
52366
52388
|
GeneralSupport.displayName = "GeneralSupport";
|
|
52367
|
-
const schema$4 = {
|
|
52368
|
-
email: {
|
|
52369
|
-
label: __("Your email address"),
|
|
52370
|
-
required: true,
|
|
52371
|
-
pattern: "email"
|
|
52372
|
-
},
|
|
52373
|
-
issueDescription: {
|
|
52374
|
-
label: __("Brief description of the issue"),
|
|
52375
|
-
required: true
|
|
52376
|
-
},
|
|
52377
|
-
issueDetails: {
|
|
52378
|
-
label: __("Details of the issue"),
|
|
52379
|
-
required: true
|
|
52380
|
-
}
|
|
52381
|
-
};
|
|
52382
52389
|
|
|
52383
52390
|
const SupportSuccess = React__default.forwardRef((props, supportSuccessRef) => {
|
|
52384
52391
|
const { email, handleClose } = props;
|
|
@@ -52620,9 +52627,6 @@ const Search$2 = React__default.forwardRef((props, navigationRef) => {
|
|
|
52620
52627
|
const searchInput = useRef("");
|
|
52621
52628
|
const searchForInstitution = useRef(null);
|
|
52622
52629
|
const supportNavRef = useRef(null);
|
|
52623
|
-
const showDisclosureStep = useSelector(
|
|
52624
|
-
(state2) => state2.profiles.widgetProfile.display_disclosure_in_connect
|
|
52625
|
-
);
|
|
52626
52630
|
const reduxDispatch = useDispatch();
|
|
52627
52631
|
const sendPosthogEvent = useAnalyticsEvent();
|
|
52628
52632
|
const postMessageFunctions = useContext(PostMessageContext);
|
|
@@ -52654,10 +52658,10 @@ const Search$2 = React__default.forwardRef((props, navigationRef) => {
|
|
|
52654
52658
|
if (state.showSupportView) {
|
|
52655
52659
|
return true;
|
|
52656
52660
|
}
|
|
52657
|
-
return
|
|
52661
|
+
return false;
|
|
52658
52662
|
}
|
|
52659
52663
|
};
|
|
52660
|
-
}, [
|
|
52664
|
+
}, [state]);
|
|
52661
52665
|
useEffect(() => {
|
|
52662
52666
|
const loadPopularInstitutions = () => {
|
|
52663
52667
|
let params = {
|
|
@@ -52813,8 +52817,10 @@ const Search$2 = React__default.forwardRef((props, navigationRef) => {
|
|
|
52813
52817
|
}
|
|
52814
52818
|
) }) : null
|
|
52815
52819
|
},
|
|
52820
|
+
disabled: state.currentView === SEARCH_VIEWS.LOADING,
|
|
52816
52821
|
fullWidth: true,
|
|
52817
52822
|
id: "mx-connect-search",
|
|
52823
|
+
inputProps: { "aria-label": __("Enter institution name"), "data-test": "search-input" },
|
|
52818
52824
|
inputRef: searchInput,
|
|
52819
52825
|
label: "",
|
|
52820
52826
|
name: "Search",
|
|
@@ -53695,13 +53701,13 @@ const DefaultMFA = (props) => {
|
|
|
53695
53701
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
53696
53702
|
ProtectedTextField,
|
|
53697
53703
|
{
|
|
53698
|
-
"aria-label": credential.label,
|
|
53699
53704
|
disabled: isSubmitting,
|
|
53700
53705
|
error: true,
|
|
53701
53706
|
helperText: errors[credential.label],
|
|
53707
|
+
inputProps: { "aria-label": credential.label },
|
|
53708
|
+
inputRef: i === 0 ? buttonRef : null,
|
|
53702
53709
|
name: credential.label,
|
|
53703
53710
|
onChange: handleMFACodeChange,
|
|
53704
|
-
ref: i === 0 ? buttonRef : null,
|
|
53705
53711
|
value: values[credential.label] || ""
|
|
53706
53712
|
}
|
|
53707
53713
|
)
|
|
@@ -57266,7 +57272,7 @@ const usePasswordInputValidation = () => {
|
|
|
57266
57272
|
"aria-label": showPassword ? __("Hide password") : __("Show password"),
|
|
57267
57273
|
edge: "end",
|
|
57268
57274
|
onClick: handleTogglePassword,
|
|
57269
|
-
children: showPassword ? /* @__PURE__ */ jsxRuntimeExports.jsx(b, { name: "visibility_off" }) : /* @__PURE__ */ jsxRuntimeExports.jsx(b, { name: "visibility" })
|
|
57275
|
+
children: showPassword ? /* @__PURE__ */ jsxRuntimeExports.jsx(b, { className: "material-symbols-rounded", name: "visibility_off" }) : /* @__PURE__ */ jsxRuntimeExports.jsx(b, { className: "material-symbols-rounded", name: "visibility" })
|
|
57270
57276
|
}
|
|
57271
57277
|
) })
|
|
57272
57278
|
)
|
|
@@ -57484,7 +57490,7 @@ const Credentials = React__default.forwardRef(
|
|
|
57484
57490
|
}
|
|
57485
57491
|
},
|
|
57486
57492
|
showBackButton() {
|
|
57487
|
-
return !isProcessingMember && !connectConfig.disable_institution_search;
|
|
57493
|
+
return !isProcessingMember && !connectConfig.disable_institution_search || showInterstitialDisclosure;
|
|
57488
57494
|
}
|
|
57489
57495
|
};
|
|
57490
57496
|
}, [
|
|
@@ -57596,13 +57602,14 @@ const Credentials = React__default.forwardRef(
|
|
|
57596
57602
|
ProtectedTextField,
|
|
57597
57603
|
{
|
|
57598
57604
|
InputProps: { endAdornment: /* @__PURE__ */ jsxRuntimeExports.jsx(PasswordShowButton, {}) },
|
|
57599
|
-
"aria-label": field.label,
|
|
57600
57605
|
autoCapitalize: "none",
|
|
57601
57606
|
autoComplete: "new-password",
|
|
57602
57607
|
disabled: isProcessingMember,
|
|
57603
57608
|
error: validations.isError || !!errors[field.field_name],
|
|
57604
57609
|
fullWidth: true,
|
|
57605
57610
|
helperText: validations.isCapsLockOn && __("Caps lock is on") || validations.validateSpaceMessage || errors[field.field_name],
|
|
57611
|
+
id: field.field_name,
|
|
57612
|
+
inputProps: { "aria-label": field.label },
|
|
57606
57613
|
label: field.label,
|
|
57607
57614
|
name: field.field_name,
|
|
57608
57615
|
onBlur: handleBlur,
|
|
@@ -57619,7 +57626,6 @@ const Credentials = React__default.forwardRef(
|
|
|
57619
57626
|
) }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: errors[field.field_name] ? styles.inputError : styles.input, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
57620
57627
|
ProtectedTextField,
|
|
57621
57628
|
{
|
|
57622
|
-
"aria-label": __("Enter your %1", field.label),
|
|
57623
57629
|
autoCapitalize: "none",
|
|
57624
57630
|
autoComplete: "new-password",
|
|
57625
57631
|
autoFocus: i === 0,
|
|
@@ -57627,6 +57633,8 @@ const Credentials = React__default.forwardRef(
|
|
|
57627
57633
|
error: !!errors[field.field_name],
|
|
57628
57634
|
fullWidth: true,
|
|
57629
57635
|
helperText: errors[field.field_name],
|
|
57636
|
+
id: field.field_name,
|
|
57637
|
+
inputProps: { "aria-label": __("Enter your %1", field.label) },
|
|
57630
57638
|
label: field.label,
|
|
57631
57639
|
name: field.field_name,
|
|
57632
57640
|
onChange: handleUserNameTextChange,
|
|
@@ -60097,19 +60105,19 @@ const getStyles$n = (tokens) => {
|
|
|
60097
60105
|
};
|
|
60098
60106
|
};
|
|
60099
60107
|
|
|
60100
|
-
const schema$3 = {
|
|
60101
|
-
routingNumber: {
|
|
60102
|
-
label: __("Routing number"),
|
|
60103
|
-
required: true,
|
|
60104
|
-
pattern: "digits",
|
|
60105
|
-
length: 9
|
|
60106
|
-
}
|
|
60107
|
-
};
|
|
60108
60108
|
const RoutingNumber = (props) => {
|
|
60109
60109
|
const { accountDetails, onContinue, stepToIAV } = props;
|
|
60110
60110
|
const connectConfig = useSelector(selectConnectConfig);
|
|
60111
60111
|
const includeIdentity = connectConfig?.include_identity ?? false;
|
|
60112
60112
|
const { api } = useApi();
|
|
60113
|
+
const schema = {
|
|
60114
|
+
routingNumber: {
|
|
60115
|
+
label: __("Routing number"),
|
|
60116
|
+
required: true,
|
|
60117
|
+
pattern: "digits",
|
|
60118
|
+
length: 9
|
|
60119
|
+
}
|
|
60120
|
+
};
|
|
60113
60121
|
const containerRef = useRef(null);
|
|
60114
60122
|
useAnalyticsPath(...PageviewInfo.CONNECT_MICRODEPOSITS_ROUTING_NUMBER);
|
|
60115
60123
|
const tokens = useTokens();
|
|
@@ -60123,7 +60131,7 @@ const RoutingNumber = (props) => {
|
|
|
60123
60131
|
const initialForm = { routingNumber: accountDetails?.routing_number ?? "" };
|
|
60124
60132
|
const { handleTextInputChange, handleSubmit, values, errors } = useForm(
|
|
60125
60133
|
() => setSubmitting(true),
|
|
60126
|
-
schema
|
|
60134
|
+
schema,
|
|
60127
60135
|
initialForm
|
|
60128
60136
|
);
|
|
60129
60137
|
useEffect(() => {
|
|
@@ -60207,11 +60215,11 @@ const RoutingNumber = (props) => {
|
|
|
60207
60215
|
{
|
|
60208
60216
|
autoComplete: "off",
|
|
60209
60217
|
autoFocus: true,
|
|
60210
|
-
"data-test": "routing-number-input",
|
|
60211
60218
|
disabled: submitting,
|
|
60212
|
-
error: errors.routingNumber
|
|
60219
|
+
error: !!errors.routingNumber || routingBlocked,
|
|
60213
60220
|
fullWidth: true,
|
|
60214
60221
|
helperText: errors.routingNumber ?? routingBlocked,
|
|
60222
|
+
inputProps: { "data-test": "routing-number-input" },
|
|
60215
60223
|
label: __("Routing number"),
|
|
60216
60224
|
name: "routingNumber",
|
|
60217
60225
|
onChange: handleTextInputChange,
|
|
@@ -60314,21 +60322,6 @@ HowItWorks.propTypes = {
|
|
|
60314
60322
|
onContinue: PropTypes$1.func.isRequired
|
|
60315
60323
|
};
|
|
60316
60324
|
|
|
60317
|
-
const schema$2 = {
|
|
60318
|
-
firstName: {
|
|
60319
|
-
label: __("First name"),
|
|
60320
|
-
required: true
|
|
60321
|
-
},
|
|
60322
|
-
lastName: {
|
|
60323
|
-
label: __("Last name"),
|
|
60324
|
-
required: true
|
|
60325
|
-
},
|
|
60326
|
-
email: {
|
|
60327
|
-
label: __("Email"),
|
|
60328
|
-
required: true,
|
|
60329
|
-
pattern: "email"
|
|
60330
|
-
}
|
|
60331
|
-
};
|
|
60332
60325
|
const PersonalInfoForm = ({ accountDetails, onContinue }) => {
|
|
60333
60326
|
const containerRef = useRef(null);
|
|
60334
60327
|
useAnalyticsPath(...PageviewInfo.CONNECT_MICRODEPOSITS_PERSONAL_INFO_FORM);
|
|
@@ -60338,9 +60331,24 @@ const PersonalInfoForm = ({ accountDetails, onContinue }) => {
|
|
|
60338
60331
|
lastName: accountDetails.last_name ?? "",
|
|
60339
60332
|
email: accountDetails.email ?? ""
|
|
60340
60333
|
};
|
|
60334
|
+
const schema = {
|
|
60335
|
+
firstName: {
|
|
60336
|
+
label: __("First name"),
|
|
60337
|
+
required: true
|
|
60338
|
+
},
|
|
60339
|
+
lastName: {
|
|
60340
|
+
label: __("Last name"),
|
|
60341
|
+
required: true
|
|
60342
|
+
},
|
|
60343
|
+
email: {
|
|
60344
|
+
label: __("Email"),
|
|
60345
|
+
required: true,
|
|
60346
|
+
pattern: "email"
|
|
60347
|
+
}
|
|
60348
|
+
};
|
|
60341
60349
|
const { handleTextInputChange, handleSubmit, values, errors } = useForm(
|
|
60342
60350
|
() => setIsSubmitting(true),
|
|
60343
|
-
schema
|
|
60351
|
+
schema,
|
|
60344
60352
|
initialFormValues
|
|
60345
60353
|
);
|
|
60346
60354
|
const tokens = useTokens();
|
|
@@ -60370,11 +60378,11 @@ const PersonalInfoForm = ({ accountDetails, onContinue }) => {
|
|
|
60370
60378
|
ProtectedTextField,
|
|
60371
60379
|
{
|
|
60372
60380
|
autoFocus: true,
|
|
60373
|
-
"data-test": "first-name-input",
|
|
60374
60381
|
error: errors.firstName,
|
|
60375
60382
|
fullWidth: true,
|
|
60376
|
-
helperText: errors.firstName,
|
|
60377
|
-
|
|
60383
|
+
helperText: !!errors.firstName,
|
|
60384
|
+
inputProps: { "data-test": "first-name-input" },
|
|
60385
|
+
label: schema.firstName.label,
|
|
60378
60386
|
name: "firstName",
|
|
60379
60387
|
onChange: handleTextInputChange,
|
|
60380
60388
|
value: values.firstName
|
|
@@ -60383,11 +60391,11 @@ const PersonalInfoForm = ({ accountDetails, onContinue }) => {
|
|
|
60383
60391
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: styles.inputStyle, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
60384
60392
|
ProtectedTextField,
|
|
60385
60393
|
{
|
|
60386
|
-
"data-test": "last-name-input",
|
|
60387
60394
|
error: errors.lastName,
|
|
60388
60395
|
fullWidth: true,
|
|
60389
|
-
helperText: errors.lastName,
|
|
60390
|
-
|
|
60396
|
+
helperText: !!errors.lastName,
|
|
60397
|
+
inputProps: { "data-test": "last-name-input" },
|
|
60398
|
+
label: schema.lastName.label,
|
|
60391
60399
|
name: "lastName",
|
|
60392
60400
|
onChange: handleTextInputChange,
|
|
60393
60401
|
value: values.lastName
|
|
@@ -60396,11 +60404,11 @@ const PersonalInfoForm = ({ accountDetails, onContinue }) => {
|
|
|
60396
60404
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: styles.inputStyle, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
60397
60405
|
ProtectedTextField,
|
|
60398
60406
|
{
|
|
60399
|
-
|
|
60400
|
-
error: errors.email,
|
|
60407
|
+
error: !!errors.email,
|
|
60401
60408
|
fullWidth: true,
|
|
60402
60409
|
helperText: errors.email,
|
|
60403
|
-
|
|
60410
|
+
inputProps: { "data-test": "email-input" },
|
|
60411
|
+
label: schema.email.label,
|
|
60404
60412
|
name: "email",
|
|
60405
60413
|
onChange: handleTextInputChange,
|
|
60406
60414
|
value: values.email
|
|
@@ -60442,20 +60450,6 @@ PersonalInfoForm.propTypes = {
|
|
|
60442
60450
|
onContinue: PropTypes$1.func.isRequired
|
|
60443
60451
|
};
|
|
60444
60452
|
|
|
60445
|
-
const schema$1 = {
|
|
60446
|
-
accountNumber: {
|
|
60447
|
-
label: __("Account number"),
|
|
60448
|
-
required: true,
|
|
60449
|
-
pattern: "digits",
|
|
60450
|
-
equalTo: "accountNumberConfirm"
|
|
60451
|
-
},
|
|
60452
|
-
accountNumberConfirm: {
|
|
60453
|
-
label: __("Confirm account number"),
|
|
60454
|
-
required: true,
|
|
60455
|
-
pattern: "digits",
|
|
60456
|
-
equalTo: "accountNumber"
|
|
60457
|
-
}
|
|
60458
|
-
};
|
|
60459
60453
|
const AccountInfo = (props) => {
|
|
60460
60454
|
const { accountDetails, focus, onContinue } = props;
|
|
60461
60455
|
const containerRef = useRef(null);
|
|
@@ -60468,9 +60462,23 @@ const AccountInfo = (props) => {
|
|
|
60468
60462
|
accountNumber: accountDetails?.account_number ?? "",
|
|
60469
60463
|
accountNumberConfirm: accountDetails?.account_number ?? ""
|
|
60470
60464
|
};
|
|
60465
|
+
const schema = {
|
|
60466
|
+
accountNumber: {
|
|
60467
|
+
label: __("Account number"),
|
|
60468
|
+
required: true,
|
|
60469
|
+
pattern: "digits",
|
|
60470
|
+
equalTo: "accountNumberConfirm"
|
|
60471
|
+
},
|
|
60472
|
+
accountNumberConfirm: {
|
|
60473
|
+
label: __("Confirm account number"),
|
|
60474
|
+
required: true,
|
|
60475
|
+
pattern: "digits",
|
|
60476
|
+
equalTo: "accountNumber"
|
|
60477
|
+
}
|
|
60478
|
+
};
|
|
60471
60479
|
const { handleTextInputChange, handleSubmit, values, errors } = useForm(
|
|
60472
60480
|
handleContinue,
|
|
60473
|
-
schema
|
|
60481
|
+
schema,
|
|
60474
60482
|
initialForm
|
|
60475
60483
|
);
|
|
60476
60484
|
const tokens = useTokens();
|
|
@@ -60527,11 +60535,11 @@ const AccountInfo = (props) => {
|
|
|
60527
60535
|
{
|
|
60528
60536
|
autoComplete: "off",
|
|
60529
60537
|
autoFocus: focus === AccountFields.ACCOUNT_NUMBER,
|
|
60530
|
-
|
|
60531
|
-
error: errors.accountNumber,
|
|
60538
|
+
error: !!errors.accountNumber,
|
|
60532
60539
|
fullWidth: true,
|
|
60533
60540
|
helperText: errors.accountNumber,
|
|
60534
|
-
|
|
60541
|
+
inputProps: { "data-test": "account-number-input" },
|
|
60542
|
+
label: schema.accountNumber.label,
|
|
60535
60543
|
name: "accountNumber",
|
|
60536
60544
|
onChange: handleTextInputChange,
|
|
60537
60545
|
type: "tel",
|
|
@@ -60542,11 +60550,11 @@ const AccountInfo = (props) => {
|
|
|
60542
60550
|
ProtectedTextField,
|
|
60543
60551
|
{
|
|
60544
60552
|
autoComplete: "off",
|
|
60545
|
-
|
|
60546
|
-
error: errors.accountNumberConfirm,
|
|
60553
|
+
error: !!errors.accountNumberConfirm,
|
|
60547
60554
|
fullWidth: true,
|
|
60548
60555
|
helperText: errors.accountNumberConfirm,
|
|
60549
|
-
|
|
60556
|
+
inputProps: { "data-test": "confirm-account-number-input" },
|
|
60557
|
+
label: schema.accountNumberConfirm.label,
|
|
60550
60558
|
name: "accountNumberConfirm",
|
|
60551
60559
|
onChange: handleTextInputChange,
|
|
60552
60560
|
type: "tel",
|
|
@@ -60947,22 +60955,6 @@ ComeBack.propTypes = {
|
|
|
60947
60955
|
onDone: PropTypes$1.func.isRequired
|
|
60948
60956
|
};
|
|
60949
60957
|
|
|
60950
|
-
const schema = {
|
|
60951
|
-
firstAmount: {
|
|
60952
|
-
label: __("Amount 1"),
|
|
60953
|
-
pattern: "number",
|
|
60954
|
-
required: true,
|
|
60955
|
-
min: 0.01,
|
|
60956
|
-
max: 0.09
|
|
60957
|
-
},
|
|
60958
|
-
secondAmount: {
|
|
60959
|
-
label: __("Amount 2"),
|
|
60960
|
-
pattern: "number",
|
|
60961
|
-
required: true,
|
|
60962
|
-
min: 0.01,
|
|
60963
|
-
max: 0.09
|
|
60964
|
-
}
|
|
60965
|
-
};
|
|
60966
60958
|
const ACTIONS$1 = {
|
|
60967
60959
|
SET_SUBMITTING: "verifyDeposits/set_submitting",
|
|
60968
60960
|
SUBMITTING_ERROR: "verifyDeposits/submitting_error"
|
|
@@ -60982,6 +60974,22 @@ const VerifyDeposits = ({ microdeposit, onSuccess }) => {
|
|
|
60982
60974
|
useAnalyticsPath(...PageviewInfo.CONNECT_MICRODEPOSITS_VERIFY_DEPOSITS);
|
|
60983
60975
|
const { api } = useApi();
|
|
60984
60976
|
const initialForm = { firstAmount: "", secondAmount: "" };
|
|
60977
|
+
const schema = {
|
|
60978
|
+
firstAmount: {
|
|
60979
|
+
label: __("Amount 1"),
|
|
60980
|
+
pattern: "number",
|
|
60981
|
+
required: true,
|
|
60982
|
+
min: 0.01,
|
|
60983
|
+
max: 0.09
|
|
60984
|
+
},
|
|
60985
|
+
secondAmount: {
|
|
60986
|
+
label: __("Amount 2"),
|
|
60987
|
+
pattern: "number",
|
|
60988
|
+
required: true,
|
|
60989
|
+
min: 0.01,
|
|
60990
|
+
max: 0.09
|
|
60991
|
+
}
|
|
60992
|
+
};
|
|
60985
60993
|
const { handleTextInputChange, handleSubmit, values, errors } = useForm(
|
|
60986
60994
|
() => dispatch({ type: ACTIONS$1.SET_SUBMITTING }),
|
|
60987
60995
|
schema,
|
|
@@ -61033,10 +61041,12 @@ const VerifyDeposits = ({ microdeposit, onSuccess }) => {
|
|
|
61033
61041
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: styles.firstInput, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
61034
61042
|
ProtectedTextField,
|
|
61035
61043
|
{
|
|
61044
|
+
FormHelperTextProps: { id: "firstAmount-error" },
|
|
61036
61045
|
autoComplete: "off",
|
|
61037
|
-
|
|
61038
|
-
error: errors.firstAmount,
|
|
61046
|
+
error: !!errors.firstAmount,
|
|
61039
61047
|
helperText: errors.firstAmount,
|
|
61048
|
+
id: schema.firstAmount.label,
|
|
61049
|
+
inputProps: { "data-test": "amount-1-input" },
|
|
61040
61050
|
label: schema.firstAmount.label,
|
|
61041
61051
|
name: "firstAmount",
|
|
61042
61052
|
onChange: handleTextInputChange,
|
|
@@ -61047,10 +61057,12 @@ const VerifyDeposits = ({ microdeposit, onSuccess }) => {
|
|
|
61047
61057
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: styles.secondInput, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
61048
61058
|
ProtectedTextField,
|
|
61049
61059
|
{
|
|
61060
|
+
FormHelperTextProps: { id: "secondAmount-error" },
|
|
61050
61061
|
autoComplete: "off",
|
|
61051
|
-
|
|
61052
|
-
error: errors.secondAmount,
|
|
61062
|
+
error: !!errors.secondAmount,
|
|
61053
61063
|
helperText: errors.secondAmount,
|
|
61064
|
+
id: schema.secondAmount.label,
|
|
61065
|
+
inputProps: { "data-test": "amount-2-input" },
|
|
61054
61066
|
label: schema.secondAmount.label,
|
|
61055
61067
|
name: "secondAmount",
|
|
61056
61068
|
onChange: handleTextInputChange,
|
|
@@ -62545,11 +62557,13 @@ const ManualAccountForm = React__default.forwardRef(
|
|
|
62545
62557
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: styles.dateInput, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
62546
62558
|
ProtectedTextField,
|
|
62547
62559
|
{
|
|
62560
|
+
FormHelperTextProps: { id: field.name + "-error" },
|
|
62548
62561
|
autoFocus: shouldFocus(field.name, returnField, i),
|
|
62549
|
-
|
|
62550
|
-
error: errors[field.name],
|
|
62562
|
+
error: !!errors[field.name],
|
|
62551
62563
|
fullWidth: true,
|
|
62552
62564
|
helperText: errors[field.name],
|
|
62565
|
+
id: field.name,
|
|
62566
|
+
inputProps: { "data-test": "date-input" },
|
|
62553
62567
|
label: field.label,
|
|
62554
62568
|
name: field.name,
|
|
62555
62569
|
onChange: () => {
|
|
@@ -62580,11 +62594,13 @@ const ManualAccountForm = React__default.forwardRef(
|
|
|
62580
62594
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: styles.textInput, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
62581
62595
|
ProtectedTextField,
|
|
62582
62596
|
{
|
|
62597
|
+
FormHelperTextProps: { id: field.name + "-error" },
|
|
62583
62598
|
autoFocus: shouldFocus(field.name, returnField, i),
|
|
62584
|
-
|
|
62585
|
-
error: errors[field.name],
|
|
62599
|
+
error: !!errors[field.name],
|
|
62586
62600
|
fullWidth: true,
|
|
62587
62601
|
helperText: errors[field.name],
|
|
62602
|
+
id: field.name,
|
|
62603
|
+
inputProps: { "data-test": `text-input-${field.name}` },
|
|
62588
62604
|
label: field.label,
|
|
62589
62605
|
name: field.name,
|
|
62590
62606
|
onChange: handleTextInputChange,
|
|
@@ -62813,11 +62829,11 @@ const ManualAccountConnect = React__default.forwardRef((props, ref) => {
|
|
|
62813
62829
|
useImperativeHandle(ref, () => {
|
|
62814
62830
|
return {
|
|
62815
62831
|
handleBackButton() {
|
|
62816
|
-
if (state.showForm) {
|
|
62832
|
+
if (state.showForm && formRef.current) {
|
|
62817
62833
|
fadeOut(formRef.current, "up", 300).then(() => {
|
|
62818
62834
|
dispatch({ type: Actions.CANCEL_FORM });
|
|
62819
62835
|
});
|
|
62820
|
-
} else {
|
|
62836
|
+
} else if (menuRef.current) {
|
|
62821
62837
|
fadeOut(menuRef.current, "up", 300).then(handleGoBackClick);
|
|
62822
62838
|
}
|
|
62823
62839
|
},
|
|
@@ -62825,7 +62841,7 @@ const ManualAccountConnect = React__default.forwardRef((props, ref) => {
|
|
|
62825
62841
|
if (state.showSuccess) {
|
|
62826
62842
|
return false;
|
|
62827
62843
|
}
|
|
62828
|
-
return
|
|
62844
|
+
return menuRef.current || formRef.current;
|
|
62829
62845
|
}
|
|
62830
62846
|
};
|
|
62831
62847
|
}, [state]);
|