UNPKG

@sheerid/jslib-nightly

Version:

SheerID JavaScript Library

159 lines (157 loc) 5.12 kB
/** * VERSION: 2.113.0-alpha.0 * BUILD_TIMESTAMP: 1750184680813 * BUILD_DATE: Tue Jun 17 2025 18:24:40 GMT+0000 (Coordinated Universal Time) * BUILD_COMMIT: 896154e79f58fffa6d52f3ed37f2db760a63df88 */ import { k as i, j as a, M as I, N as y, m as F, w as P, O as T, f as n, u as l, T as k, U as R, W as L, E as V, n as q, X as A, Y as B, Z as O, _ as W, o as D, V as H, q as K } from "./es6-B9qAIX4x.js"; import { useEffect as w } from "react"; import { injectIntl as U, FormattedHTMLMessage as m } from "react-intl"; const X = ({ verificationService: e }) => { var p, u, C, b, x, h, N; const o = e.viewModel, { fieldValidationErrors: t } = e, r = e.verificationResponse, M = i(r), g = y(), d = (s, j) => { const E = K( o, (f) => { f[s] = j; } ); e.updateViewModel(E); }; return w(() => { d("statuses", r.availableStatuses); }, []), /* @__PURE__ */ a.jsxs( I, { verificationService: e, step: r.currentStep, children: [ /* @__PURE__ */ a.jsx( F, { verificationService: e, classNameIdentifier: "mover-personal-info" } ), /* @__PURE__ */ a.jsx(P, { 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( k, { 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( R, { 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( L, { 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( 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), 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( A, { 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, g.customFormFields.map((s) => /* @__PURE__ */ a.jsx(B, { config: s, verificationService: e })), /* @__PURE__ */ a.jsx( O, { 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(W, { verificationService: e, suffix: "CollectAboveSubmit" }), /* @__PURE__ */ a.jsx( D, { step: H.collectMoverPersonalInfo, verificationService: e, viewModel: o, failedInstantMatch: M, buttonText: /* @__PURE__ */ a.jsx( m, { id: "step.personalInfo.submitButtonText", defaultMessage: "Verify My Recent Mover Status" } ) } ) ] } ); }, z = U(X); export { z as default };