@sheerid/jslib-nightly
Version:
SheerID JavaScript Library
108 lines (106 loc) • 4.13 kB
JavaScript
/**
* VERSION: 2.154.0-alpha.1
* BUILD_TIMESTAMP: 1763401626706
* BUILD_DATE: Mon Nov 17 2025 17:47:06 GMT+0000 (Coordinated Universal Time)
* BUILD_COMMIT: 73f4468155aaed0f31ab0d59dc3394018b939b6d
*/
import { j as s, w as h, t as x, A as y, x as N, y as j, z as S, o as g, B as w, D as C, V as l, q as f, r as M } from "./es6-OV3Jb0XZ.js";
import E from "react";
import { injectIntl as F, FormattedHTMLMessage as o } from "react-intl";
const V = ({ verificationService: e }) => {
const [d, r] = E.useState(!0), t = e.viewModel, { fieldValidationErrors: c } = e, a = () => e.submitStep(
l.cancelSocialSecurityNumber,
t,
e.verificationResponse
), n = (i, m) => {
const b = M(
t,
(p) => {
p[i] = m;
}
);
e.updateViewModel(b);
}, u = t.socialSecurityNumber && t.socialSecurityNumber.toString().length === 9;
return d ? /* @__PURE__ */ s.jsx(
h,
{
useSsn: () => r(!1),
useDocUpload: a,
verificationService: e
}
) : /* @__PURE__ */ s.jsxs(
"div",
{
id: "sid-step-social-security",
className: "sid-social-sercurity-number-container sid-l-container sid-l-horz-center",
children: [
/* @__PURE__ */ s.jsxs("div", { role: "main", children: [
/* @__PURE__ */ s.jsxs("div", { className: "sid-header", children: [
/* @__PURE__ */ s.jsx("div", { className: "sid-social-security-number-logo-container sid-l-horz-center", children: /* @__PURE__ */ s.jsx(x, { verificationService: e }) }),
/* @__PURE__ */ s.jsx(y, { align: "center", children: /* @__PURE__ */ s.jsx(
o,
{
id: "step.collectSocialSecurityNumber.title",
defaultMessage: "Enter your social security number",
tagName: "h1"
}
) }),
/* @__PURE__ */ s.jsx(N, { verificationService: e }),
/* @__PURE__ */ s.jsx("div", { className: "sid-ssn-wrapper", children: /* @__PURE__ */ s.jsx(
j,
{
value: t.socialSecurityNumber,
onChange: (i) => {
n("socialSecurityNumber", i), g(
"socialSecurityNumber",
i,
e
);
},
isErrored: !!c[S.socialSecurityNumber],
placeholder: "000-00-0000"
}
) })
] }),
/* @__PURE__ */ s.jsx("div", { className: "sid-form-region sid-submit-wrapper sid-l-space-top-md", children: /* @__PURE__ */ s.jsx("div", { className: "sid-social-security-number-submit sid-submit", children: /* @__PURE__ */ s.jsx(
"button",
{
id: "sid-submit-wrapper__collect-info",
onClick: () => C(
t,
e,
l.collectSocialSecurityNumber
),
type: "submit",
className: `sid-btn sid-social-security-number-submit-btn sid-btn--dark sid-l-full-width ${u ? "" : "sid-btn--disabled-like"}`,
"aria-label": "submit",
ref: (i) => w("submitButton", i),
children: /* @__PURE__ */ s.jsx(o, { id: "proceed", defaultMessage: "Proceed" })
}
) }) }),
/* @__PURE__ */ s.jsx(
"div",
{
className: "sid-form-region sid-social-security-number-upload-instead-btn sid-l-space-top-md",
role: "button",
tabIndex: 0,
onKeyUp: a,
onClick: a,
children: /* @__PURE__ */ s.jsx("div", { className: "sid-social-security-number-upload-instead-text sid-h-link-like", children: /* @__PURE__ */ s.jsx(
o,
{
id: "step.collectSocialSecurityNumber.uploadInstead",
defaultMessage: "Upload a document instead"
}
) })
}
)
] }),
/* @__PURE__ */ s.jsx(f, { verificationService: e })
]
}
);
}, _ = F(V);
export {
_ as default
};