UNPKG

@sheerid/jslib-nightly

Version:

SheerID JavaScript Library

64 lines (62 loc) 1.93 kB
/** * 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 { g as u, j as a, H as f, F as l, p as m } from "../_mysheerid-preview.js"; import { D as g } from "./CaptchaComponent-CnWyxiTy.js"; const c = ({ onChange: t, isRequired: s = !0, errorId: i, isErrored: o = !!i, value: n = "2000-01-01", locale: d = f, disabled: e = !1 }) => u("birthDate")?.hidden ? null : /* @__PURE__ */ a.jsx( g, { value: n, label: /* @__PURE__ */ a.jsx(l, { id: "birthDate", defaultMessage: "Date of birth" }), explanation: /* @__PURE__ */ a.jsx( l, { id: "verificationPurposesOnly", defaultMessage: "Used for verification purposes only" } ), onChange: t, fieldId: "birthdate", fieldName: "birthDate", isErrored: o, isRequired: s, locale: d, disabled: e, autoComplete: "bday", errorMsg: /* @__PURE__ */ a.jsx(l, { id: `errorId.${i}`, defaultMessage: "Invalid birth date" }) } ), D = (t, s, i, o) => { const n = i.viewModel; return m( n, (e) => { e[t] = s; const r = ["status", "dischargeDate"]; e.fieldsToSkipValidation = (e.fieldsToSkipValidation || []).filter( (p) => !r.includes(p) ), o || e.fieldsToSkipValidation.push("status"), !i.programTheme.transitionalMilitaryValidityDays && i.verificationResponse.currentStep !== "collectInactiveMilitaryPersonalInfo" && e.fieldsToSkipValidation.push("dischargeDate"), t === "status" && (e.organization = { id: 0, name: "" }); } ); }; export { c as B, D as u };