@sheerid/jslib-nightly
Version:
SheerID JavaScript Library
232 lines (230 loc) • 7.16 kB
JavaScript
/**
* 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 N, X as y, j as a, P as g, o as r, g as n, n as j, 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 L, L as D, P as R, a as T, M as B, C as k } from "./CaptchaComponent-SmUa6m52.js";
import { E as q, P as H } from "./PersonalInfoStepSubmitButton-j44RdZDq.js";
import { A } from "./AddressComponent-AiyIPiCz.js";
import { C as V } from "./City-yVVnZQTP.js";
import { P as K } from "./PostalCodeComponent-DrCcV90W.js";
import { B as O } from "./militaryStepHelpers-0OUuQpBw.js";
import { D as W } from "./DriverLicenseNumberComponent-ziLNYB8e.js";
import { S as c } from "./StateSelectComponent-CChSqKXz.js";
import { C as U } from "./ChangeLocaleComponent-DUnfgQuX.js";
import { P as X } from "./PersonalInfoStepWrapper-PV06WMKL.js";
const Y = ({
intl: i,
verificationService: s
}) => {
const o = s.viewModel, { fieldValidationErrors: t } = s, m = s.verificationResponse, u = N(m), b = F(), C = o.localeChoice.value, d = (e, l) => {
const h = f(
o,
(x) => {
x[e] = l;
}
);
s.updateViewModel(h);
};
return y(), /* @__PURE__ */ a.jsxs(
X,
{
verificationService: s,
step: m.currentStep,
children: [
/* @__PURE__ */ a.jsx(
g,
{
verificationService: s,
classNameIdentifier: "hybrid-identity"
}
),
/* @__PURE__ */ a.jsx(U, { verificationService: s }),
/* @__PURE__ */ a.jsxs("div", { className: "sid-names", children: [
/* @__PURE__ */ a.jsx(
L,
{
value: o.firstName,
isErrored: !!t.firstName,
disabled: n("firstName")?.disabled,
onChange: (e) => {
d("firstName", e), r("firstName", e, s);
}
}
),
/* @__PURE__ */ a.jsx(
D,
{
value: o.lastName,
isErrored: !!t.lastName,
disabled: n("lastName")?.disabled,
onChange: (e) => {
d("lastName", e), r("lastName", e, s);
}
}
)
] }),
/* @__PURE__ */ a.jsx(
q,
{
value: o.email,
isErrored: !!t.email,
explanation: /* @__PURE__ */ a.jsx(
p,
{
id: "emailExplanation",
defaultMessage: "Personal email address is recommended"
}
),
onChange: (e) => {
d("email", e), r("email", e, s);
},
onKeyDown: (e) => j(e),
disabled: n("email")?.disabled
}
),
s.programTheme.isSmsNotifierConfigured || s.programTheme.smsLoopEnabled ? /* @__PURE__ */ a.jsx(
R,
{
isRequired: !!s.programTheme.smsLoopEnabled,
value: o.phoneNumber,
isErrored: !!t.phoneNumber,
onChange: (e) => {
d("phoneNumber", e), r("phoneNumber", e, s);
},
selectedCountryCode: o.countryChoice && o.countryChoice.value,
disabled: n("phoneNumber")?.disabled
}
) : null,
/* @__PURE__ */ a.jsx(
O,
{
errorId: t.birthDate,
locale: C,
onChange: (e) => {
d("birthDate", e), r("birthDate", e, s);
},
value: o.birthDate,
disabled: n("birthDate")?.disabled
}
),
/* @__PURE__ */ a.jsx(
A,
{
isErrored: !!t.address1,
errorId: t.address1,
onChange: (e) => {
d("address1", e), r("address1", e, s);
},
value: o.address1,
isRequired: !0,
disabled: n("address1")?.disabled
}
),
/* @__PURE__ */ a.jsxs("div", { className: "sid-thirds", children: [
/* @__PURE__ */ a.jsx(
V,
{
isErrored: !!t.city,
errorId: t.city,
onChange: (e) => {
d("city", e), r("city", e, s);
},
value: o.city,
isRequired: !0,
disabled: n("city")?.disabled
}
),
/* @__PURE__ */ a.jsx(
c,
{
isRequired: !0,
options: E(s.programTheme, i),
value: o.state || void 0,
isErrored: !!t.state,
disabled: n("state")?.disabled,
onChange: async (e) => {
const l = e ? e.value : void 0;
d("state", l), r("state", l, s);
}
}
),
/* @__PURE__ */ a.jsx(
K,
{
isErrored: !!t.postalCode,
onChange: (e) => {
d("postalCode", e), r("postalCode", e, s);
},
value: o.postalCode,
disabled: n("postalCode")?.disabled
}
)
] }),
/* @__PURE__ */ a.jsx(
W,
{
value: o.driverLicenseNumber,
isErrored: !!t.driverLicenseNumber,
isRequired: !0,
disabled: n("driverLicenseNumber")?.disabled,
onChange: (e) => {
d("driverLicenseNumber", e), r(
"driverLicenseNumber",
e,
s
);
}
}
),
b.customFormFields.map((e) => /* @__PURE__ */ a.jsx(T, { config: e, verificationService: s })),
/* @__PURE__ */ a.jsx(
B,
{
verificationService: s,
isErrored: !!t.marketConsentValue,
onChange: (e) => {
d("metadata", {
...s.viewModel.metadata,
marketConsentValue: e
}), r("marketConsentValue", e, s);
},
viewModel: o,
disabled: n("marketConsentValue")?.disabled
}
),
/* @__PURE__ */ a.jsx(I, { verificationService: s, suffix: "CollectAboveSubmit" }),
/* @__PURE__ */ a.jsx(
k,
{
verificationService: s,
isErrored: !!t.captchaToken
}
),
/* @__PURE__ */ a.jsx(
H,
{
step: M.collectHybridIdentityPersonalInfo,
verificationService: s,
viewModel: o,
failedInstantMatch: u,
buttonText: /* @__PURE__ */ a.jsx(
p,
{
id: "step.personalInfo.submitButtonText",
defaultMessage: "Verify My Identity"
}
)
}
)
]
}
);
}, se = P(Y);
export {
Y as StepHybridIdentityPersonalInfo,
se as StepHybridIdentityPersonalInfoComponent,
se as default
};