@sheerid/jslib-nightly
Version:
SheerID JavaScript Library
161 lines (159 loc) • 5.22 kB
JavaScript
/**
* WARNING: This file is intended to be used within MySheerID.
* This file is not intended for use in other contexts and there are no guarantees about its behavior outside of MySheerID.
*/
/**
* VERSION: 2.130.0-alpha.4
* BUILD_TIMESTAMP: 1759000347595
* BUILD_DATE: Sat Sep 27 2025 19:12:27 GMT+0000 (Coordinated Universal Time)
* BUILD_COMMIT: be6ef87ab40e8747994d32363389cf39e36a4326
*/
import { i as I, h as f, t as y, j as a, v as F, w as P, P as k, x as R, y as T, g as n, f as l, z as B, B as L, b as m, D as V, E as A, e as q, G as D, H, M as K, I as O, k as W, V as w, n as z } from "../_mysheerid-preview.js";
const G = ({ verificationService: e }) => {
var p, u, C, b, x, h, N;
const o = e.viewModel, { fieldValidationErrors: t } = e, r = e.verificationResponse, g = f(r), M = P(), d = (s, j) => {
const E = z(
o,
(i) => {
i[s] = j;
}
);
e.updateViewModel(E);
};
return y.useEffect(() => {
d("statuses", r.availableStatuses);
}, []), /* @__PURE__ */ a.jsxs(
F,
{
verificationService: e,
step: r.currentStep,
children: [
/* @__PURE__ */ a.jsx(
k,
{
verificationService: e,
classNameIdentifier: "mover-personal-info"
}
),
/* @__PURE__ */ a.jsx(R, { verificationService: e }),
/* @__PURE__ */ a.jsxs("div", { className: "sid-names", children: [
/* @__PURE__ */ a.jsx(
T,
{
value: o.firstName,
isErrored: !!t.firstName,
disabled: (p = n("firstName")) == null ? void 0 : p.disabled,
onChange: (s) => {
d("firstName", s), l("firstName", s, e);
}
}
),
/* @__PURE__ */ a.jsx(
B,
{
value: o.lastName,
isErrored: !!t.lastName,
disabled: (u = n("lastName")) == null ? void 0 : u.disabled,
onChange: (s) => {
d("lastName", s), l("lastName", s, e);
}
}
)
] }),
/* @__PURE__ */ a.jsx(
L,
{
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: (C = n("address1")) == null ? void 0 : C.disabled
}
),
/* @__PURE__ */ a.jsx(
V,
{
value: o.postalCode,
isErrored: !!t.postalCode,
disabled: (b = n("postalCode")) == null ? void 0 : b.disabled,
onChange: (s) => {
d("postalCode", s), l("postalCode", s, e);
}
}
),
/* @__PURE__ */ a.jsx(
A,
{
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) => q(s),
disabled: (x = n("email")) == null ? void 0 : x.disabled
}
),
e.programTheme.isSmsNotifierConfigured || e.programTheme.smsLoopEnabled ? /* @__PURE__ */ a.jsx(
D,
{
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: (h = n("phoneNumber")) == null ? void 0 : h.disabled
}
) : null,
M.customFormFields.map((s) => /* @__PURE__ */ a.jsx(H, { 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 = n("marketConsentValue")) == null ? void 0 : N.disabled
}
),
/* @__PURE__ */ a.jsx(O, { suffix: "CollectAboveSubmit" }),
/* @__PURE__ */ a.jsx(
W,
{
step: w.collectMoverPersonalInfo,
verificationService: e,
viewModel: o,
failedInstantMatch: g,
buttonText: /* @__PURE__ */ a.jsx(
m,
{
id: "step.personalInfo.submitButtonText",
defaultMessage: "Verify My Recent Mover Status"
}
)
}
)
]
}
);
}, Q = I(G);
export {
Q as default
};