UNPKG

@sheerid/jslib-nightly

Version:

SheerID JavaScript Library

225 lines (223 loc) • 6.83 kB
/** * 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 { k as x, j as a, N as I, O as L, m as f, x as j, a2 as R, f as t, ae as M, o as l, a4 as T, T as P, U as A, a5 as y, X as O, E as D, n as F, Y as _, Z as V, _ as k, $ as z, p as B, V as G, r as H } from "./es6-OV3Jb0XZ.js"; import { injectIntl as W, FormattedHTMLMessage as p } from "react-intl"; import { L as c } from "./LicensedProfessionalOrganizationComponent-DC2J_FAh.js"; const w = { LICENSED_COSMETOLOGIST: "Licensed Cosmetologist", LICENSED_REAL_ESTATE_AGENT: "Licensed Real Estate Agent", VETERINARIAN: "Veterinarian", CHILD_CARE_WORKER: "Child Care Worker", LIBRARIAN: "Librarian", INTERIOR_DESIGNER: "Interior Designer", ARCHITECT: "Architect", GENERAL_CONTRACTOR: "General Contractor", NUTRITION_PROFESSIONAL: "Nutrition Professional" }, K = ({ intl: C, verificationService: e }) => { const o = e.viewModel, { fieldValidationErrors: n } = e, u = e.verificationResponse, b = x(u), E = o.localeChoice.value, g = L(), d = (s, r) => { const m = H( o, (N) => { N[s] = r; } ); e.updateViewModel(m); }, i = (s) => s ? C.formatHTMLMessage({ id: s, defaultMessage: w[s] }) : "", h = () => { const s = u.availableStatuses, r = []; if (s) for (const m of s) r.push({ value: m, label: i(m) }); return r; }; return /* @__PURE__ */ a.jsxs( I, { verificationService: e, step: u.currentStep, children: [ /* @__PURE__ */ a.jsx( f, { verificationService: e, classNameIdentifier: "licensed-professional" } ), /* @__PURE__ */ a.jsx(j, { verificationService: e }), /* @__PURE__ */ a.jsx( R, { verificationService: e, disabled: t("country")?.disabled } ), /* @__PURE__ */ a.jsx( M, { segmentId: "licensed-professional", value: { value: o.statuses ? o.statuses[0] : "", label: o.statuses ? i(o.statuses[0]) : "" }, isErrored: !!n.statuses, options: h(), disabled: t("statuses")?.disabled, onChange: (s) => { const r = s ? [s.value] : []; d("statuses", r), l( "statuses", s ? s.value : "", e ); } } ), /* @__PURE__ */ a.jsx( c, { isErrored: !!n.organization, onChange: (s) => { T(s, e), l("organization", s, e); }, value: e.viewModel.organization, verificationService: e, disabled: t("organization")?.disabled } ), /* @__PURE__ */ a.jsxs("div", { className: "sid-names", children: [ /* @__PURE__ */ a.jsx( P, { value: o.firstName, isErrored: !!n.firstName, disabled: t("firstName")?.disabled, onChange: (s) => { d("firstName", s), l("firstName", s, e); } } ), /* @__PURE__ */ a.jsx( A, { value: o.lastName, isErrored: !!n.lastName, disabled: t("lastName")?.disabled, onChange: (s) => { d("lastName", s), l("lastName", s, e); } } ) ] }), /* @__PURE__ */ a.jsx( y, { errorId: n.birthDate, locale: E, onChange: (s) => { d("birthDate", s), l("birthDate", s, e); }, value: o.birthDate, disabled: t("birthDate")?.disabled } ), /* @__PURE__ */ a.jsx( O, { isErrored: !!n.postalCode, onChange: (s) => { d("postalCode", s), l("postalCode", s, e); }, value: o.postalCode, disabled: t("postalCode")?.disabled, explanation: /* @__PURE__ */ a.jsx( p, { id: "postalCodeExplanation", defaultMessage: "Use the location on file with your licensing body" } ) } ), /* @__PURE__ */ a.jsx( D, { value: o.email, isErrored: !!n.email, explanation: /* @__PURE__ */ a.jsx( p, { id: "emailExplanation", defaultMessage: "Needed to send you your unique code" } ), onChange: (s) => { d("email", s), l("email", s, e); }, onKeyDown: (s) => F(s), disabled: t("email")?.disabled } ), e.programTheme.isSmsNotifierConfigured || e.programTheme.smsLoopEnabled ? /* @__PURE__ */ a.jsx( _, { isRequired: !!e.programTheme.smsLoopEnabled, value: o.phoneNumber, isErrored: !!n.phoneNumber, onChange: (s) => { d("phoneNumber", s), l("phoneNumber", s, e); }, selectedCountryCode: o.countryChoice && o.countryChoice.value, disabled: t("phoneNumber")?.disabled } ) : null, g.customFormFields.map((s) => /* @__PURE__ */ a.jsx(V, { config: s, verificationService: e })), /* @__PURE__ */ a.jsx( k, { verificationService: e, isErrored: !!n.marketConsentValue, onChange: (s) => { d("metadata", { ...e.viewModel.metadata, marketConsentValue: s }), l("marketConsentValue", s, e); }, viewModel: o, disabled: t("marketConsentValue")?.disabled } ), /* @__PURE__ */ a.jsx(z, { verificationService: e, suffix: "CollectAboveSubmit" }), /* @__PURE__ */ a.jsx( B, { step: G.collectLicensedProfessionalPersonalInfo, verificationService: e, viewModel: o, failedInstantMatch: b, buttonText: /* @__PURE__ */ a.jsx( p, { id: "step.personalInfo.submitButtonText", defaultMessage: "Verify My Licensed Professional Status" } ) } ) ] } ); }, Y = W( K ); export { Y as default };