@sheerid/jslib-nightly
Version:
SheerID JavaScript Library
156 lines (154 loc) • 4.83 kB
JavaScript
/**
* VERSION: 2.154.0-alpha.1
* BUILD_TIMESTAMP: 1763401515326
* BUILD_DATE: Mon Nov 17 2025 17:45:15 GMT+0000 (Coordinated Universal Time)
* BUILD_COMMIT: 73f4468155aaed0f31ab0d59dc3394018b939b6d
*/
import { i as h, h as N, r as M, j as a, x as g, y as j, P as E, z as i, B as I, a as n, k as l, D as f, G as y, c as m, H as F, E as P, f as k, J as R, K as T, M as B, N as L, m as V, V as A, o as q } from "../sheerid.js";
const D = ({ verificationService: e }) => {
const o = e.viewModel, { fieldValidationErrors: t } = e, r = e.verificationResponse, p = N(r), u = j(), d = (s, C) => {
const b = q(
o,
(x) => {
x[s] = C;
}
);
e.updateViewModel(b);
};
return M.useEffect(() => {
d("statuses", r.availableStatuses);
}, []), /* @__PURE__ */ a.jsxs(
g,
{
verificationService: e,
step: r.currentStep,
children: [
/* @__PURE__ */ a.jsx(
E,
{
verificationService: e,
classNameIdentifier: "mover-personal-info"
}
),
/* @__PURE__ */ a.jsx(i, { verificationService: e }),
/* @__PURE__ */ a.jsxs("div", { className: "sid-names", children: [
/* @__PURE__ */ a.jsx(
I,
{
value: o.firstName,
isErrored: !!t.firstName,
disabled: n("firstName")?.disabled,
onChange: (s) => {
d("firstName", s), l("firstName", s, e);
}
}
),
/* @__PURE__ */ a.jsx(
f,
{
value: o.lastName,
isErrored: !!t.lastName,
disabled: n("lastName")?.disabled,
onChange: (s) => {
d("lastName", s), l("lastName", s, e);
}
}
)
] }),
/* @__PURE__ */ a.jsx(
y,
{
value: o.address1,
isErrored: !!t.address1,
errorId: t.address1,
onChange: (s) => {
d("address1", s), l("address1", s, e);
},
label: /* @__PURE__ */ a.jsx(m, { id: "streetAddress", defaultMessage: "Street Address" }),
isRequired: !0,
disabled: n("address1")?.disabled
}
),
/* @__PURE__ */ a.jsx(
F,
{
value: o.postalCode,
isErrored: !!t.postalCode,
disabled: n("postalCode")?.disabled,
onChange: (s) => {
d("postalCode", s), l("postalCode", s, e);
}
}
),
/* @__PURE__ */ a.jsx(
P,
{
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), l("email", s, e);
},
onKeyDown: (s) => k(s),
disabled: n("email")?.disabled
}
),
e.programTheme.isSmsNotifierConfigured || e.programTheme.smsLoopEnabled ? /* @__PURE__ */ a.jsx(
R,
{
isRequired: !!e.programTheme.smsLoopEnabled,
value: o.phoneNumber,
isErrored: !!t.phoneNumber,
onChange: (s) => {
d("phoneNumber", s), l("phoneNumber", s, e);
},
selectedCountryCode: o.countryChoice && o.countryChoice.value,
disabled: n("phoneNumber")?.disabled
}
) : null,
u.customFormFields.map((s) => /* @__PURE__ */ a.jsx(T, { config: s, verificationService: e })),
/* @__PURE__ */ a.jsx(
B,
{
verificationService: e,
isErrored: !!t.marketConsentValue,
onChange: (s) => {
d("metadata", {
...e.viewModel.metadata,
marketConsentValue: s
}), l("marketConsentValue", s, e);
},
viewModel: o,
disabled: n("marketConsentValue")?.disabled
}
),
/* @__PURE__ */ a.jsx(L, { verificationService: e, suffix: "CollectAboveSubmit" }),
/* @__PURE__ */ a.jsx(
V,
{
step: A.collectMoverPersonalInfo,
verificationService: e,
viewModel: o,
failedInstantMatch: p,
buttonText: /* @__PURE__ */ a.jsx(
m,
{
id: "step.personalInfo.submitButtonText",
defaultMessage: "Verify My Recent Mover Status"
}
)
}
)
]
}
);
}, K = h(D);
export {
K as default
};