@sheerid/jslib-nightly
Version:
SheerID JavaScript Library
169 lines (167 loc) • 5.3 kB
JavaScript
/**
* VERSION: 2.230.0-alpha.0
* BUILD_TIMESTAMP: 1778694684677
* BUILD_DATE: Wed May 13 2026 17:51:24 GMT+0000 (Coordinated Universal Time)
* BUILD_COMMIT: 7af1c105d5485ac4ed1190c56d492bb4590667a9
*/
import { i as h, m as N, b as g, j as a, P as j, o as n, g as l, F as m, n as E, U as M, V as f, p as i, e as I } from "../sheerid.js";
import { F, L as P, P as y, a as T, M as k, C as L } from "./CaptchaComponent-SmUa6m52.js";
import { A as R } from "./AddressComponent-AiyIPiCz.js";
import { P as A } from "./PostalCodeComponent-DrCcV90W.js";
import { E as V, P as B } from "./PersonalInfoStepSubmitButton-j44RdZDq.js";
import { C as q } from "./ChangeLocaleComponent-DUnfgQuX.js";
import { P as D } from "./PersonalInfoStepWrapper-PV06WMKL.js";
const H = ({ verificationService: e }) => {
const o = e.viewModel, { fieldValidationErrors: t } = e, r = e.verificationResponse, p = N(r), u = I(), d = (s, C) => {
const b = i(
o,
(x) => {
x[s] = C;
}
);
e.updateViewModel(b);
};
return g.useEffect(() => {
d("statuses", r.availableStatuses);
}, []), /* @__PURE__ */ a.jsxs(
D,
{
verificationService: e,
step: r.currentStep,
children: [
/* @__PURE__ */ a.jsx(
j,
{
verificationService: e,
classNameIdentifier: "mover-personal-info"
}
),
/* @__PURE__ */ a.jsx(q, { verificationService: e }),
/* @__PURE__ */ a.jsxs("div", { className: "sid-names", children: [
/* @__PURE__ */ a.jsx(
F,
{
value: o.firstName,
isErrored: !!t.firstName,
disabled: l("firstName")?.disabled,
onChange: (s) => {
d("firstName", s), n("firstName", s, e);
}
}
),
/* @__PURE__ */ a.jsx(
P,
{
value: o.lastName,
isErrored: !!t.lastName,
disabled: l("lastName")?.disabled,
onChange: (s) => {
d("lastName", s), n("lastName", s, e);
}
}
)
] }),
/* @__PURE__ */ a.jsx(
R,
{
value: o.address1,
isErrored: !!t.address1,
errorId: t.address1,
onChange: (s) => {
d("address1", s), n("address1", s, e);
},
label: /* @__PURE__ */ a.jsx(m, { id: "streetAddress", defaultMessage: "Street Address" }),
isRequired: !0,
disabled: l("address1")?.disabled
}
),
/* @__PURE__ */ a.jsx(
A,
{
value: o.postalCode,
isErrored: !!t.postalCode,
disabled: l("postalCode")?.disabled,
onChange: (s) => {
d("postalCode", s), n("postalCode", s, e);
}
}
),
/* @__PURE__ */ a.jsx(
V,
{
value: o.email,
isErrored: !!t.email,
explanation: /* @__PURE__ */ a.jsx(
m,
{
id: "emailExplanation",
defaultMessage: "Needed to send you your unique code"
}
),
onChange: (s) => {
d("email", s), n("email", s, e);
},
onKeyDown: (s) => E(s),
disabled: l("email")?.disabled
}
),
e.programTheme.isSmsNotifierConfigured || e.programTheme.smsLoopEnabled ? /* @__PURE__ */ a.jsx(
y,
{
isRequired: !!e.programTheme.smsLoopEnabled,
value: o.phoneNumber,
isErrored: !!t.phoneNumber,
onChange: (s) => {
d("phoneNumber", s), n("phoneNumber", s, e);
},
selectedCountryCode: o.countryChoice && o.countryChoice.value,
disabled: l("phoneNumber")?.disabled
}
) : null,
u.customFormFields.map((s) => /* @__PURE__ */ a.jsx(T, { config: s, verificationService: e })),
/* @__PURE__ */ a.jsx(
k,
{
verificationService: e,
isErrored: !!t.marketConsentValue,
onChange: (s) => {
d("metadata", {
...e.viewModel.metadata,
marketConsentValue: s
}), n("marketConsentValue", s, e);
},
viewModel: o,
disabled: l("marketConsentValue")?.disabled
}
),
/* @__PURE__ */ a.jsx(M, { verificationService: e, suffix: "CollectAboveSubmit" }),
/* @__PURE__ */ a.jsx(
L,
{
verificationService: e,
isErrored: !!t.captchaToken
}
),
/* @__PURE__ */ a.jsx(
B,
{
step: f.collectMoverPersonalInfo,
verificationService: e,
viewModel: o,
failedInstantMatch: p,
buttonText: /* @__PURE__ */ a.jsx(
m,
{
id: "step.personalInfo.submitButtonText",
defaultMessage: "Verify My Recent Mover Status"
}
)
}
)
]
}
);
}, J = h(H);
export {
J as default
};