UNPKG

@sheerid/jslib-nightly

Version:

SheerID JavaScript Library

216 lines (214 loc) • 6.72 kB
/** * VERSION: 2.230.0-alpha.0 * BUILD_TIMESTAMP: 1778694684677 * BUILD_DATE: Wed May 13 2026 17:51:24 GMT+0000 (Coordinated Universal Time) * BUILD_COMMIT: 7af1c105d5485ac4ed1190c56d492bb4590667a9 */ import { m as g, X as j, j as a, P as y, o as n, g as l, n as N, F as p, Y as E, U as I, V as M, i as P, p as f, e as F } from "../sheerid.js"; import { F as R, L as D, P as T, a as B, M as k, C as L } from "./CaptchaComponent-SmUa6m52.js"; import { E as q, P as A } from "./PersonalInfoStepSubmitButton-j44RdZDq.js"; import { A as V } from "./AddressComponent-AiyIPiCz.js"; import { C as G } from "./City-yVVnZQTP.js"; import { P as H } from "./PostalCodeComponent-DrCcV90W.js"; import { B as K } from "./militaryStepHelpers-0OUuQpBw.js"; import { S as O } from "./StateSelectComponent-CChSqKXz.js"; import { C as W } from "./ChangeLocaleComponent-DUnfgQuX.js"; import { P as U } from "./PersonalInfoStepWrapper-PV06WMKL.js"; const X = ({ intl: C, verificationService: e }) => { const t = e.viewModel, { fieldValidationErrors: o } = e, m = e.verificationResponse, u = g(m), i = F(), h = t.localeChoice.value, d = (s, r) => { const b = f( t, (x) => { x[s] = r; } ); e.updateViewModel(b); }; return j(), /* @__PURE__ */ a.jsxs( U, { verificationService: e, step: m.currentStep, children: [ /* @__PURE__ */ a.jsx( y, { verificationService: e, classNameIdentifier: "general-identity" } ), /* @__PURE__ */ a.jsx(W, { verificationService: e }), /* @__PURE__ */ a.jsxs("div", { className: "sid-names", children: [ /* @__PURE__ */ a.jsx( R, { value: t.firstName, isErrored: !!o.firstName, disabled: l("firstName")?.disabled, onChange: (s) => { d("firstName", s), n("firstName", s, e); } } ), /* @__PURE__ */ a.jsx( D, { value: t.lastName, isErrored: !!o.lastName, disabled: l("lastName")?.disabled, onChange: (s) => { d("lastName", s), n("lastName", s, e); } } ) ] }), /* @__PURE__ */ a.jsx( q, { value: t.email, isErrored: !!o.email, explanation: /* @__PURE__ */ a.jsx( p, { id: "emailExplanation", defaultMessage: "Personal email address is recommended" } ), onChange: (s) => { d("email", s), n("email", s, e); }, onKeyDown: (s) => N(s), disabled: l("email")?.disabled } ), e.programTheme.isSmsNotifierConfigured || e.programTheme.smsLoopEnabled ? /* @__PURE__ */ a.jsx( T, { isRequired: !!e.programTheme.smsLoopEnabled, value: t.phoneNumber, isErrored: !!o.phoneNumber, onChange: (s) => { d("phoneNumber", s), n("phoneNumber", s, e); }, selectedCountryCode: t.countryChoice && t.countryChoice.value, disabled: l("phoneNumber")?.disabled } ) : null, /* @__PURE__ */ a.jsx( K, { errorId: o.birthDate, locale: h, onChange: (s) => { d("birthDate", s), n("birthDate", s, e); }, value: t.birthDate, disabled: l("birthDate")?.disabled } ), /* @__PURE__ */ a.jsx( V, { isErrored: !!o.address1, errorId: o.address1, onChange: (s) => { d("address1", s), n("address1", s, e); }, value: t.address1, isRequired: !0, disabled: l("address1")?.disabled } ), /* @__PURE__ */ a.jsxs("div", { className: "sid-extra-address-inputs sid-thirds", children: [ /* @__PURE__ */ a.jsx( G, { isErrored: !!o.city, errorId: o.city, onChange: (s) => { d("city", s), n("city", s, e); }, value: t.city, isRequired: !0, disabled: l("city")?.disabled } ), /* @__PURE__ */ a.jsx( O, { isRequired: !0, options: E(e.programTheme, C), value: t.state || void 0, isErrored: !!o.state, disabled: l("state")?.disabled, onChange: async (s) => { const r = s ? s.value : void 0; d("state", r), n("state", r, e); } } ), /* @__PURE__ */ a.jsx( H, { isErrored: !!o.postalCode, onChange: (s) => { d("postalCode", s), n("postalCode", s, e); }, value: t.postalCode, isRequired: !0, disabled: l("postalCode")?.disabled } ) ] }), i.customFormFields.map((s) => /* @__PURE__ */ a.jsx(B, { config: s, verificationService: e })), /* @__PURE__ */ a.jsx( k, { verificationService: e, isErrored: !!o.marketConsentValue, onChange: (s) => { d("metadata", { ...e.viewModel.metadata, marketConsentValue: s }), n("marketConsentValue", s, e); }, viewModel: t, disabled: l("marketConsentValue")?.disabled } ), /* @__PURE__ */ a.jsx(I, { verificationService: e, suffix: "CollectAboveSubmit" }), /* @__PURE__ */ a.jsx( L, { verificationService: e, isErrored: !!o.captchaToken } ), /* @__PURE__ */ a.jsx( A, { step: M.collectGeneralIdentityPersonalInfo, verificationService: e, viewModel: t, failedInstantMatch: u, buttonText: /* @__PURE__ */ a.jsx( p, { id: "step.personalInfo.submitButtonText", defaultMessage: "Verify My Identity" } ) } ) ] } ); }, v = P(X); export { X as StepGeneralIdentityPersonalInfo, v as StepGeneralIdentityPersonalInfoComponent, v as default };