@sheerid/jslib-nightly
Version:
SheerID JavaScript Library
182 lines (180 loc) • 5.77 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.230.0-alpha.0
* BUILD_TIMESTAMP: 1778694697559
* BUILD_DATE: Wed May 13 2026 17:51:37 GMT+0000 (Coordinated Universal Time)
* BUILD_COMMIT: 7af1c105d5485ac4ed1190c56d492bb4590667a9
*/
import { m as x, X as N, j as a, P as g, o as d, g as r, n as j, F as l, Y as E, U as L, V as M, i as I, p as f, e as F } from "../_mysheerid-preview.js";
import { F as y, L as P, P as D, a as T, M as R, C as V } from "./CaptchaComponent-CnWyxiTy.js";
import { E as k, P as B } from "./PersonalInfoStepSubmitButton-v_kWLmEw.js";
import { D as c } from "./DriverLicenseNumberComponent-D9cakdvU.js";
import { S as q } from "./StateSelectComponent-CIpB-Rh1.js";
import { C as A } from "./ChangeLocaleComponent-Cu2DR-Q3.js";
import { P as H } from "./PersonalInfoStepWrapper-BOBNCgik.js";
const K = ({
intl: u,
verificationService: s
}) => {
const t = s.viewModel, { fieldValidationErrors: o } = s, p = s.verificationResponse, i = x(p), b = F(), n = (e, m) => {
const C = f(
t,
(h) => {
h[e] = m;
}
);
s.updateViewModel(C);
};
return N(), /* @__PURE__ */ a.jsxs(
H,
{
verificationService: s,
step: p.currentStep,
children: [
/* @__PURE__ */ a.jsx(
g,
{
verificationService: s,
classNameIdentifier: "drivers-license"
}
),
/* @__PURE__ */ a.jsx(A, { verificationService: s }),
/* @__PURE__ */ a.jsxs("div", { className: "sid-names", children: [
/* @__PURE__ */ a.jsx(
y,
{
value: t.firstName,
isErrored: !!o.firstName,
disabled: r("firstName")?.disabled,
onChange: (e) => {
n("firstName", e), d("firstName", e, s);
}
}
),
/* @__PURE__ */ a.jsx(
P,
{
value: t.lastName,
isErrored: !!o.lastName,
disabled: r("lastName")?.disabled,
onChange: (e) => {
n("lastName", e), d("lastName", e, s);
}
}
)
] }),
/* @__PURE__ */ a.jsx(
k,
{
value: t.email,
isErrored: !!o.email,
explanation: /* @__PURE__ */ a.jsx(
l,
{
id: "emailExplanation",
defaultMessage: "Personal email address is recommended"
}
),
onChange: (e) => {
n("email", e), d("email", e, s);
},
onKeyDown: (e) => j(e),
disabled: r("email")?.disabled
}
),
s.programTheme.isSmsNotifierConfigured || s.programTheme.smsLoopEnabled ? /* @__PURE__ */ a.jsx(
D,
{
isRequired: !!s.programTheme.smsLoopEnabled,
value: t.phoneNumber,
isErrored: !!o.phoneNumber,
onChange: (e) => {
n("phoneNumber", e), d("phoneNumber", e, s);
},
selectedCountryCode: t.countryChoice && t.countryChoice.value,
disabled: r("phoneNumber")?.disabled
}
) : null,
/* @__PURE__ */ a.jsx(
q,
{
isRequired: !0,
options: E(s.programTheme, u),
value: t.state || void 0,
isErrored: !!o.state,
disabled: r("state")?.disabled,
onChange: async (e) => {
const m = e ? e.value : void 0;
n("state", m), d("state", m, s);
},
label: /* @__PURE__ */ a.jsx(l, { id: "driverLicenseState", defaultMessage: "Driver license state" })
}
),
/* @__PURE__ */ a.jsx(
c,
{
value: t.driverLicenseNumber,
isErrored: !!o.driverLicenseNumber,
isRequired: !0,
disabled: r("driverLicenseNumber")?.disabled,
onChange: (e) => {
n("driverLicenseNumber", e), d(
"driverLicenseNumber",
e,
s
);
}
}
),
b.customFormFields.map((e) => /* @__PURE__ */ a.jsx(T, { config: e, verificationService: s })),
/* @__PURE__ */ a.jsx(
R,
{
verificationService: s,
isErrored: !!o.marketConsentValue,
onChange: (e) => {
n("metadata", {
...s.viewModel.metadata,
marketConsentValue: e
}), d("marketConsentValue", e, s);
},
viewModel: t,
disabled: r("marketConsentValue")?.disabled
}
),
/* @__PURE__ */ a.jsx(L, { verificationService: s, suffix: "CollectAboveSubmit" }),
/* @__PURE__ */ a.jsx(
V,
{
verificationService: s,
isErrored: !!o.captchaToken
}
),
/* @__PURE__ */ a.jsx(
B,
{
step: M.collectDriverLicensePersonalInfo,
verificationService: s,
viewModel: t,
failedInstantMatch: i,
buttonText: /* @__PURE__ */ a.jsx(
l,
{
id: "step.personalInfo.submitButtonText",
defaultMessage: "Verify My Identity"
}
)
}
)
]
}
);
}, G = I(K);
export {
K as StepDriverLicensePersonalInfo,
G as StepDriverLicensePersonalInfoComponent,
G as default
};