UNPKG

@sheerid/jslib-nightly

Version:

SheerID JavaScript Library

157 lines (155 loc) 5.03 kB
/** * VERSION: 2.113.0-alpha.0 * BUILD_TIMESTAMP: 1750184600854 * BUILD_DATE: Tue Jun 17 2025 18:23:20 GMT+0000 (Coordinated Universal Time) * BUILD_COMMIT: 896154e79f58fffa6d52f3ed37f2db760a63df88 */ import { i as I, h as f, s as y, j as a, t as F, v as P, P as R, w as T, x as k, g as n, u as l, y as B, z as L, b as m, B as V, E as A, e as q, D, G as H, M as K, H as O, f as W, V as w, m as z } from "../sheerid.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( R, { verificationService: e, classNameIdentifier: "mover-personal-info" } ), /* @__PURE__ */ a.jsx(T, { verificationService: e }), /* @__PURE__ */ a.jsxs("div", { className: "sid-names", children: [ /* @__PURE__ */ a.jsx( k, { 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, { verificationService: e, 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 };