@sheerid/jslib-nightly
Version:
SheerID JavaScript Library
158 lines (156 loc) • 4.9 kB
JavaScript
/**
* VERSION: 2.154.0-alpha.1
* BUILD_TIMESTAMP: 1763401626706
* BUILD_DATE: Mon Nov 17 2025 17:47:06 GMT+0000 (Coordinated Universal Time)
* BUILD_COMMIT: 73f4468155aaed0f31ab0d59dc3394018b939b6d
*/
import { k as h, j as a, N, O as g, m as j, x as M, T as E, f as n, o as l, U as f, W as i, X as I, E as y, n as F, Y as P, Z as T, _ as k, $ as R, p as L, V, r as A } from "./es6-OV3Jb0XZ.js";
import { useEffect as B } from "react";
import { injectIntl as q, FormattedHTMLMessage as m } from "react-intl";
const O = ({ verificationService: e }) => {
const o = e.viewModel, { fieldValidationErrors: t } = e, r = e.verificationResponse, p = h(r), u = g(), d = (s, C) => {
const b = A(
o,
(x) => {
x[s] = C;
}
);
e.updateViewModel(b);
};
return B(() => {
d("statuses", r.availableStatuses);
}, []), /* @__PURE__ */ a.jsxs(
N,
{
verificationService: e,
step: r.currentStep,
children: [
/* @__PURE__ */ a.jsx(
j,
{
verificationService: e,
classNameIdentifier: "mover-personal-info"
}
),
/* @__PURE__ */ a.jsx(M, { verificationService: e }),
/* @__PURE__ */ a.jsxs("div", { className: "sid-names", children: [
/* @__PURE__ */ a.jsx(
E,
{
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(
i,
{
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(
I,
{
value: o.postalCode,
isErrored: !!t.postalCode,
disabled: n("postalCode")?.disabled,
onChange: (s) => {
d("postalCode", s), l("postalCode", s, e);
}
}
),
/* @__PURE__ */ a.jsx(
y,
{
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) => F(s),
disabled: n("email")?.disabled
}
),
e.programTheme.isSmsNotifierConfigured || e.programTheme.smsLoopEnabled ? /* @__PURE__ */ a.jsx(
P,
{
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(
k,
{
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(R, { verificationService: e, suffix: "CollectAboveSubmit" }),
/* @__PURE__ */ a.jsx(
L,
{
step: V.collectMoverPersonalInfo,
verificationService: e,
viewModel: o,
failedInstantMatch: p,
buttonText: /* @__PURE__ */ a.jsx(
m,
{
id: "step.personalInfo.submitButtonText",
defaultMessage: "Verify My Recent Mover Status"
}
)
}
)
]
}
);
}, K = q(O);
export {
K as default
};