@sheerid/jslib 1.84.0 → 1.85.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es5/Tmetrix.bundle.js +5 -5
- package/es5/messages_ar.bundle.js +5 -5
- package/es5/messages_bg.bundle.js +5 -5
- package/es5/messages_cs.bundle.js +5 -5
- package/es5/messages_da.bundle.js +5 -5
- package/es5/messages_de.bundle.js +5 -5
- package/es5/messages_el.bundle.js +5 -5
- package/es5/messages_en-GB.bundle.js +5 -5
- package/es5/messages_es-ES.bundle.js +5 -5
- package/es5/messages_es.bundle.js +5 -5
- package/es5/messages_fi.bundle.js +5 -5
- package/es5/messages_fr-CA.bundle.js +5 -5
- package/es5/messages_fr.bundle.js +5 -5
- package/es5/messages_ga.bundle.js +5 -5
- package/es5/messages_hr.bundle.js +5 -5
- package/es5/messages_hu.bundle.js +5 -5
- package/es5/messages_id.bundle.js +5 -5
- package/es5/messages_it.bundle.js +5 -5
- package/es5/messages_iw.bundle.js +5 -5
- package/es5/messages_ja.bundle.js +5 -5
- package/es5/messages_ko.bundle.js +5 -5
- package/es5/messages_lo.bundle.js +5 -5
- package/es5/messages_lt.bundle.js +5 -5
- package/es5/messages_ms.bundle.js +5 -5
- package/es5/messages_nl.bundle.js +5 -5
- package/es5/messages_no.bundle.js +5 -5
- package/es5/messages_pl.bundle.js +5 -5
- package/es5/messages_pt-BR.bundle.js +5 -5
- package/es5/messages_pt.bundle.js +5 -5
- package/es5/messages_ru.bundle.js +5 -5
- package/es5/messages_sk.bundle.js +5 -5
- package/es5/messages_sl.bundle.js +5 -5
- package/es5/messages_sr.bundle.js +5 -5
- package/es5/messages_sv.bundle.js +5 -5
- package/es5/messages_th.bundle.js +5 -5
- package/es5/messages_tr.bundle.js +5 -5
- package/es5/messages_zh-HK.bundle.js +5 -5
- package/es5/messages_zh.bundle.js +5 -5
- package/manifest.json +48 -48
- package/package.json +1 -1
- package/sheerid-requestOrg.css +5 -5
- package/sheerid-requestOrg.css.map +1 -1
- package/sheerid-requestOrg.js +15 -15
- package/sheerid-requestOrg.js.map +1 -1
- package/sheerid-utils.js +9 -9
- package/sheerid-utils.js.map +1 -1
- package/sheerid.css +5 -5
- package/sheerid.css.map +1 -1
- package/sheerid.js +17 -17
- package/sheerid.js.map +1 -1
- package/sheerides6.js +144 -212
- package/sheerides6.js.map +1 -1
- package/src/components/FieldLabel.d.ts +11 -0
- package/src/components/FormFields/Address/AddressComponent.d.ts +1 -1
- package/src/components/FormFields/BirthDate/BirthDateComponent.d.ts +1 -1
- package/src/components/FormFields/BranchOfService/BranchOfServiceComponent.d.ts +1 -1
- package/src/components/FormFields/ChangeLocale/ChangeLocaleComponent.d.ts +1 -1
- package/src/components/FormFields/City/City.d.ts +1 -1
- package/src/components/FormFields/CollegeName/CollegeNameComponent.d.ts +2 -2
- package/src/components/FormFields/Company/CompanyComponent.d.ts +1 -1
- package/src/components/FormFields/Country/CountryComponent.d.ts +1 -1
- package/src/components/FormFields/Country/CountryComponentWrapper.d.ts +1 -1
- package/src/components/FormFields/DischargeDate/DischargeDateComponent.d.ts +1 -1
- package/src/components/FormFields/DriverLicenseNumber/DriverLicenseNumberComponent.d.ts +1 -1
- package/src/components/FormFields/Email/EmailComponent.d.ts +1 -1
- package/src/components/FormFields/FirstName/FirstNameComponent.d.ts +1 -1
- package/src/components/FormFields/FirstResponderOrganization/FirstResponderOrganizationComponent.d.ts +1 -1
- package/src/components/FormFields/FirstResponderStatus/FirstResponderStatusComponent.d.ts +1 -1
- package/src/components/FormFields/LastName/LastNameComponent.d.ts +1 -1
- package/src/components/FormFields/LicensedProfessionalOrganization/LicensedProfessionalOrganizationComponent.d.ts +1 -1
- package/src/components/FormFields/MedicalProfessionalOrganization/MedicalProfessionalOrganizationComponent.d.ts +1 -1
- package/src/components/FormFields/MedicalStatus/MedicalStatusComponent.d.ts +1 -1
- package/src/components/FormFields/MemberId/MemberIdComponent.d.ts +3 -3
- package/src/components/FormFields/MembershipOrganization/MembershipOrganizationComponent.d.ts +1 -1
- package/src/components/FormFields/MilitaryStatus/MilitaryStatusComponent.d.ts +1 -1
- package/src/components/FormFields/PhoneNumber/PhoneNumberComponent.d.ts +2 -1
- package/src/components/FormFields/SMSCode/SMSCodeComponent.d.ts +1 -1
- package/src/components/FormFields/SSN/SSN.d.ts +1 -1
- package/src/components/FormFields/State/State.d.ts +1 -1
- package/src/components/FormFields/State/StateSelectComponent.d.ts +1 -1
- package/src/components/FormFields/Status/StatusComponent.d.ts +1 -1
- package/src/components/FormFields/TeacherSchool/TeacherSchoolComponent.d.ts +1 -1
- package/src/components/FormInputs/InputSelect/InputSelectComponent.d.ts +2 -1
- package/src/lib/types/types.d.ts +29 -29
- package/src/lib/utils/stepComponentHelpers/stepComponentHelpers.d.ts +1 -1
- package/types-reference.zip +0 -0
package/sheerides6.js
CHANGED
|
@@ -2824,7 +2824,7 @@ const getMessages = async (locale, programThemeMessages, segment) => {
|
|
|
2824
2824
|
const hasSegmentMessages = messagesModule && messagesModule.segmentMessages;
|
|
2825
2825
|
const segmentSpecificMessages = segment && hasSegmentMessages ? messagesModule.segmentMessages[segment] : {};
|
|
2826
2826
|
const optionsMessages = getOptionsMessages(usedLocale);
|
|
2827
|
-
const cleanFlatThemeMessages = programThemeMessages
|
|
2827
|
+
const cleanFlatThemeMessages = programThemeMessages ? getThemeMessages$1(programThemeMessages) : {};
|
|
2828
2828
|
// For non en-US locales, we'll merge en-US messages as a base
|
|
2829
2829
|
const defaultLocaleMessages = usedLocale !== DEFAULT_LOCALE ? await getMessages(DEFAULT_LOCALE, programThemeMessages, segment) : {};
|
|
2830
2830
|
// Flatten these before object.assign so they are dot-props, so nested objects aren't overwritten, deleting properties
|
|
@@ -3432,7 +3432,6 @@ const getExtendedFieldValidationErrorsEmpty = () => {
|
|
|
3432
3432
|
const GetEmptyTheme = () => ({
|
|
3433
3433
|
intl: {
|
|
3434
3434
|
locale: getLocaleSafely(),
|
|
3435
|
-
// @ts-ignore
|
|
3436
3435
|
messages: {},
|
|
3437
3436
|
},
|
|
3438
3437
|
customCss: '',
|
|
@@ -4586,7 +4585,7 @@ const handleEmailOnKeyDown = (event) => {
|
|
|
4586
4585
|
}
|
|
4587
4586
|
};
|
|
4588
4587
|
/**
|
|
4589
|
-
* @
|
|
4588
|
+
* @deprecated Accessibility standards prevent setting focus without user keyboard interaction
|
|
4590
4589
|
*/
|
|
4591
4590
|
const handleCountryOnKeyDown = (event) => {
|
|
4592
4591
|
if (event.key === 'Tab' && !event.shiftKey) {
|
|
@@ -4695,6 +4694,18 @@ const produceDraftViewModel = (previousModel, key, value) => fn(previousModel, (
|
|
|
4695
4694
|
draft[key] = value;
|
|
4696
4695
|
});
|
|
4697
4696
|
|
|
4697
|
+
const FieldLabel = ({ text, htmlForLabel, id, displayClasses, isRequired, children, }) => (React.createElement("label", { htmlFor: htmlForLabel },
|
|
4698
|
+
React.createElement("div", { id: id, className: `sid-field__label sid-l-space-btm-sm ${displayClasses}` },
|
|
4699
|
+
text,
|
|
4700
|
+
isRequired && React.createElement("span", { className: "sid-field__label--required" }, "*"),
|
|
4701
|
+
children && (React.createElement("div", { className: "sid-field__label-explanation" }, children)))));
|
|
4702
|
+
FieldLabel.defaultProps = {
|
|
4703
|
+
id: '',
|
|
4704
|
+
displayClasses: '',
|
|
4705
|
+
isRequired: true,
|
|
4706
|
+
children: null,
|
|
4707
|
+
};
|
|
4708
|
+
|
|
4698
4709
|
const InputText = ({ id, isErrored, className = undefined, hidePlaceholder = true, refId, required = false, type = 'text', ariaDescribedBy, ariaLabel, ...props // forward any remaining props to the input
|
|
4699
4710
|
}) => {
|
|
4700
4711
|
let internalClassName = '';
|
|
@@ -4715,9 +4726,7 @@ const InputTextComponent = injectIntl(InputText);
|
|
|
4715
4726
|
|
|
4716
4727
|
const FirstName = ({ value, isErrored, onChange, intl, placeholder = '', }) => (React.createElement("div", { className: "sid-field sid-first-name" },
|
|
4717
4728
|
React.createElement("div", { className: "sid-l-space-top-md" }),
|
|
4718
|
-
React.createElement("
|
|
4719
|
-
React.createElement("div", { className: `sid-field__label sid-field__label--required sid-l-space-btm-sm ${placeholder ? 'sid-h-screen-reader-only' : ''}` },
|
|
4720
|
-
React.createElement(FormattedHTMLMessage, { id: "firstName", defaultMessage: "First name" }))),
|
|
4729
|
+
React.createElement(FieldLabel, { text: React.createElement(FormattedHTMLMessage, { id: "firstName", defaultMessage: "First name" }), htmlForLabel: "sid-first-name", id: "sid-first-name-label", displayClasses: placeholder && 'sid-h-screen-reader-only' }),
|
|
4721
4730
|
React.createElement(InputTextComponent, { id: "first-name", isErrored: isErrored, onChange: e => onChange(e.target.value), placeholder: placeholder || intl.formatMessage({ id: 'firstNamePlaceholder', defaultMessage: 'First Name*' }), refId: "firstName", value: value, required: true }),
|
|
4722
4731
|
isErrored ? (React.createElement("div", { className: "sid-field-error" },
|
|
4723
4732
|
React.createElement(FormattedHTMLMessage, { id: "errorId.invalidFirstName", defaultMessage: "Invalid first name" }))) : null));
|
|
@@ -4725,9 +4734,7 @@ const FirstNameComponent = injectIntl(FirstName);
|
|
|
4725
4734
|
|
|
4726
4735
|
const LastName = ({ value, isErrored, onChange, intl, placeholder = '', }) => (React.createElement("div", { className: "sid-field sid-last-name" },
|
|
4727
4736
|
React.createElement("div", { className: "sid-l-space-top-md" }),
|
|
4728
|
-
React.createElement("
|
|
4729
|
-
React.createElement("div", { className: `sid-field__label sid-field__label--required sid-l-space-btm-sm ${placeholder ? 'sid-h-screen-reader-only' : ''}` },
|
|
4730
|
-
React.createElement(FormattedHTMLMessage, { id: "lastName", defaultMessage: "Last name" }))),
|
|
4737
|
+
React.createElement(FieldLabel, { text: React.createElement(FormattedHTMLMessage, { id: "lastName", defaultMessage: "Last name" }), htmlForLabel: "sid-last-name", id: "sid-last-name-label", displayClasses: placeholder && 'sid-h-screen-reader-only' }),
|
|
4731
4738
|
React.createElement(InputTextComponent, { id: "last-name", isErrored: isErrored, onChange: event => onChange(event.target.value), placeholder: placeholder || intl.formatMessage({ id: 'lastNamePlaceholder', defaultMessage: 'Last Name*' }), refId: "lastName", value: value, required: true }),
|
|
4732
4739
|
isErrored ? (React.createElement("div", { className: "sid-field-error" },
|
|
4733
4740
|
React.createElement(FormattedHTMLMessage, { id: "errorId.invalidLastName", defaultMessage: "Invalid last name" }))) : null));
|
|
@@ -4735,11 +4742,7 @@ const LastNameComponent = injectIntl(LastName);
|
|
|
4735
4742
|
|
|
4736
4743
|
const Email = ({ value, isErrored, onChange, explanation, intl, onKeyDown = undefined, placeholder = '', }) => (React.createElement("div", { className: "sid-field sid-email" },
|
|
4737
4744
|
React.createElement("div", { className: "sid-l-space-top-md" }),
|
|
4738
|
-
React.createElement("
|
|
4739
|
-
React.createElement("div", { className: `sid-field__label-with-explanation sid-l-space-btm-sm ${placeholder ? 'sid-h-screen-reader-only' : ''}` },
|
|
4740
|
-
React.createElement("div", { className: "sid-field__label sid-field__label--required" },
|
|
4741
|
-
React.createElement(FormattedHTMLMessage, { id: "emailAddress", defaultMessage: "Email address" })),
|
|
4742
|
-
React.createElement("div", { className: "sid-field__label-explanation" }, explanation || (React.createElement(FormattedHTMLMessage, { id: "emailExplanation", defaultMessage: "Needed to send you your unique code" }))))),
|
|
4745
|
+
React.createElement(FieldLabel, { text: React.createElement(FormattedHTMLMessage, { id: "emailAddress", defaultMessage: "Email address" }), htmlForLabel: "sid-email", id: "sid-email-label", displayClasses: `sid-field__label-with-explanation${placeholder && ' sid-h-screen-reader-only'}` }, explanation || (React.createElement(FormattedHTMLMessage, { id: "emailExplanation", defaultMessage: "Needed to send you your unique code" }))),
|
|
4743
4746
|
React.createElement(InputTextComponent, { id: "email", isErrored: isErrored, onChange: event => onChange(event.target.value), onKeyDown: typeof onKeyDown === 'function' ? e => onKeyDown(e) : undefined, placeholder: placeholder || intl.formatMessage({ id: 'emailAddressPlaceholder', defaultMessage: 'Email*' }), type: "email", value: value, required: true }),
|
|
4744
4747
|
isErrored ? (React.createElement("div", { className: "sid-field-error" },
|
|
4745
4748
|
React.createElement(FormattedHTMLMessage, { id: "errorId.invalidEmail", defaultMessage: "Invalid email" }))) : null));
|
|
@@ -9358,7 +9361,7 @@ const InputSelectButton = ({ clearSelection, disabled, getToggleButtonProps, isO
|
|
|
9358
9361
|
const InputSelectButtonComponent = InputSelectButton;
|
|
9359
9362
|
|
|
9360
9363
|
/* eslint-disable indent */
|
|
9361
|
-
const InputSelect = ({ className, inputId, disabled, fieldId, isErrored, options, onKeyDown, onChange, placeholder,
|
|
9364
|
+
const InputSelect = ({ className, inputId, disabled, fieldId, fieldLabelId, isErrored, options, onKeyDown, onChange, placeholder,
|
|
9362
9365
|
// Most invokers want placeholder hidden by css, so it can be easily shown when
|
|
9363
9366
|
// customizing the implementation. Birth date is an example of an exception.
|
|
9364
9367
|
suppressPlaceholder = true, value, autoFocus, ariaLabel, isRequired, buttonRef, }) => {
|
|
@@ -9381,13 +9384,13 @@ suppressPlaceholder = true, value, autoFocus, ariaLabel, isRequired, buttonRef,
|
|
|
9381
9384
|
};
|
|
9382
9385
|
return (React.createElement(Downshift, { id: inputId, onChange: onChange, itemToString: itemToString, selectedItem: value && value.value && value.label ? value : '', defaultHighlightedIndex: 0 }, ({ clearSelection, getInputProps, getItemProps, getMenuProps, getToggleButtonProps, highlightedIndex, inputValue, isOpen, openMenu, selectedItem, selectHighlightedItem, }) => (React.createElement("div", { className: `sid-input-select-list ${className}` },
|
|
9383
9386
|
React.createElement("input", Object.assign({}, getInputProps({
|
|
9384
|
-
|
|
9387
|
+
onClick: () => openMenu(),
|
|
9385
9388
|
onBlur: event => handleOnBlur(event, selectHighlightedItem, selectedItem),
|
|
9386
9389
|
onKeyDown: event => handleOnKeyDown(event),
|
|
9387
9390
|
}), {
|
|
9388
9391
|
// TODO resolve next line. Product needs this to autofocus, but linter says bad for accessibility
|
|
9389
9392
|
// eslint-disable-next-line
|
|
9390
|
-
autoFocus: autoFocus, id: inputId, className: `sid-l-full-width sid-text-input ${suppressPlaceholder ? 'sid-hidden-placeholder' : ''} ${isErrored ? 'sid-text-input--error' : ''}`, disabled: disabled, placeholder: placeholder, ref: input => setRef(fieldId, input), "aria-required": isRequired })),
|
|
9393
|
+
autoFocus: autoFocus, id: inputId, className: `sid-l-full-width sid-text-input ${suppressPlaceholder ? 'sid-hidden-placeholder' : ''} ${isErrored ? 'sid-text-input--error' : ''}`, disabled: disabled, placeholder: placeholder, ref: input => setRef(fieldId, input), "aria-required": isRequired, "aria-labelledby": fieldLabelId })),
|
|
9391
9394
|
React.createElement(InputSelectButtonComponent, { disabled: disabled, getToggleButtonProps: getToggleButtonProps, isOpen: isOpen, clearSelection: selectedItem ? clearSelection : undefined, buttonRef: buttonRef }),
|
|
9392
9395
|
isOpen
|
|
9393
9396
|
? (React.createElement("div", null, filterOptions(options, inputValue).length > 0
|
|
@@ -9408,17 +9411,18 @@ InputSelect.defaultProps = {
|
|
|
9408
9411
|
};
|
|
9409
9412
|
const InputSelectComponent = InputSelect;
|
|
9410
9413
|
|
|
9411
|
-
const Country = ({ value, isErrored, options, onChange, onKeyDown, intl, placeholder = '', isRequired = false, }) =>
|
|
9412
|
-
|
|
9413
|
-
React.createElement("
|
|
9414
|
-
React.createElement("div", { className:
|
|
9415
|
-
|
|
9416
|
-
|
|
9417
|
-
|
|
9418
|
-
|
|
9419
|
-
|
|
9420
|
-
|
|
9421
|
-
|
|
9414
|
+
const Country = ({ value, isErrored, options, onChange, onKeyDown, intl, placeholder = '', isRequired = false, }) => {
|
|
9415
|
+
const inputId = 'sid-country';
|
|
9416
|
+
return (React.createElement("div", { className: `sid-field ${inputId}` },
|
|
9417
|
+
React.createElement("div", { className: "sid-l-space-top-md" }),
|
|
9418
|
+
React.createElement(FieldLabel, { text: React.createElement(FormattedHTMLMessage, { id: "country", defaultMessage: "Country" }), htmlForLabel: inputId, id: `${inputId}-label`, displayClasses: placeholder && 'sid-h-screen-reader-only', isRequired: isRequired }),
|
|
9419
|
+
React.createElement(InputSelectComponent, { fieldId: "country", inputId: inputId, fieldLabelId: `${inputId}-label`, isErrored: isErrored, options: options, onChange: (country) => onChange(country), onKeyDown: onKeyDown, placeholder: placeholder || intl.formatMessage({ id: 'countryPlaceholder', defaultMessage: 'Country*' }), value: value ? {
|
|
9420
|
+
value: value.value,
|
|
9421
|
+
label: intl.formatMessage({ id: `countries.${value.value}`, defaultMessage: value.label || value.value }),
|
|
9422
|
+
} : undefined, isRequired: true }),
|
|
9423
|
+
isErrored ? (React.createElement("div", { className: "sid-field-error" },
|
|
9424
|
+
React.createElement(FormattedHTMLMessage, { id: "errorId.invalidCountry", defaultMessage: "Invalid country" }))) : null));
|
|
9425
|
+
};
|
|
9422
9426
|
const CountryComponent = injectIntl(Country);
|
|
9423
9427
|
|
|
9424
9428
|
const ROW_HEIGHT$1 = 42;
|
|
@@ -15789,27 +15793,28 @@ module.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;va
|
|
|
15789
15793
|
|
|
15790
15794
|
var PhoneInput = unwrapExports(lib);
|
|
15791
15795
|
|
|
15792
|
-
const PhoneNumber = ({ value, isErrored, onChange, explanation, onCarrierConsentChange,
|
|
15796
|
+
const PhoneNumber = ({ value, isErrored, onChange, explanation, onCarrierConsentChange,
|
|
15797
|
+
// eslint-disable-next-line
|
|
15798
|
+
intl, // deprecated
|
|
15799
|
+
isRequired = false, onKeyDown = undefined, placeholder = '', displaySmsConsent = true, requireCarrierConsent = false, carrierConsent = false,
|
|
15800
|
+
// eslint-disable-next-line
|
|
15801
|
+
internationalSupport = false, // deprecated
|
|
15802
|
+
selectedCountryCode = 'us', }) => {
|
|
15793
15803
|
const getDefaultExplanation = () => (!isRequired
|
|
15794
15804
|
? (React.createElement(FormattedHTMLMessage, { id: "phoneNumberExplanation", defaultMessage: "Optional - get text notifications of status updates" }))
|
|
15795
15805
|
: '');
|
|
15796
15806
|
return (React.createElement("div", { className: "sid-field sid-phone-number" },
|
|
15797
15807
|
React.createElement("div", { className: "sid-l-space-top-md" }),
|
|
15798
|
-
React.createElement("
|
|
15799
|
-
|
|
15800
|
-
|
|
15801
|
-
React.createElement(FormattedHTMLMessage, { id: "phoneNumber", defaultMessage: "Mobile Number" })),
|
|
15802
|
-
React.createElement("div", { className: "sid-field__label-explanation" }, explanation || getDefaultExplanation()))),
|
|
15803
|
-
internationalSupport ? (React.createElement(React.Fragment, null,
|
|
15804
|
-
React.createElement(InputTextComponent, { className: "sid-phone-number__placeholder", id: "phone-number-placeholder", isErrored: false }),
|
|
15805
|
-
React.createElement(PhoneInput, { country: "us", containerClass: "react-tel-input sid-phone-number__wrapper", inputClass: `sid-text-input sid-phone-number__field sid-phone-number__field--intl ${isRequired ? 'sid-text-input--required' : ''}
|
|
15808
|
+
React.createElement(FieldLabel, { text: React.createElement(FormattedHTMLMessage, { id: "phoneNumber", defaultMessage: "Mobile Number" }), htmlForLabel: "sid-phone-number", id: "sid-phone-number-label", displayClasses: `sid-field__label-with-explanation${placeholder && 'sid-h-screen-reader-only'}`, isRequired: isRequired }, explanation || getDefaultExplanation()),
|
|
15809
|
+
React.createElement(React.Fragment, null,
|
|
15810
|
+
React.createElement(PhoneInput, { country: selectedCountryCode.toLowerCase(), containerClass: "react-tel-input sid-phone-number__wrapper", inputClass: `sid-text-input sid-phone-number__field sid-phone-number__field--intl ${isRequired ? 'sid-text-input--required' : ''}
|
|
15806
15811
|
sid-l-full-width ${isErrored ? 'sid-text-input--error' : ''}`, autoFormat: false, value: value, onChange: value => onChange(value), placeholder: placeholder,
|
|
15807
15812
|
// @ts-ignore
|
|
15808
15813
|
ref: input => setRef('phoneNumber', input), inputProps: {
|
|
15809
15814
|
id: 'sid-phone-number',
|
|
15810
15815
|
name: 'sid-phone-number',
|
|
15811
15816
|
onKeyDown: e => (onKeyDown ? onKeyDown(e) : undefined),
|
|
15812
|
-
} }))
|
|
15817
|
+
} })),
|
|
15813
15818
|
isErrored ? (React.createElement("div", { className: "sid-field-error" },
|
|
15814
15819
|
React.createElement(FormattedHTMLMessage, { id: "errorId.invalidPhoneNumber", defaultMessage: "Invalid mobile number" }))) : null,
|
|
15815
15820
|
displaySmsConsent && (React.createElement("div", { className: "sid-h-small-text sid-l-space-top-md sid-sms-consent" },
|
|
@@ -16048,7 +16053,7 @@ const Typeahead = ({ onChange, programId, className, countryCode, disabled, mini
|
|
|
16048
16053
|
};
|
|
16049
16054
|
const TypeaheadComponent = Typeahead;
|
|
16050
16055
|
|
|
16051
|
-
const CollegeName = ({ onChange, value, isErrored, verificationService, intl, placeholder = '', }) => {
|
|
16056
|
+
const CollegeName = ({ onChange, value, isErrored, verificationService, intl, placeholder = '', isRequired = true, }) => {
|
|
16052
16057
|
const { programId, viewModel, verificationResponse } = verificationService;
|
|
16053
16058
|
const locale = getLocaleSafely(viewModel, verificationResponse);
|
|
16054
16059
|
const urlAddSchoolForm = (getOptions().urlAddSchoolForm || '').trim();
|
|
@@ -16056,10 +16061,8 @@ const CollegeName = ({ onChange, value, isErrored, verificationService, intl, pl
|
|
|
16056
16061
|
const searchTags = getOrgSearchCountryTags(verificationService.programTheme, country);
|
|
16057
16062
|
return (React.createElement("div", { className: "sid-field sid-college-name-id" },
|
|
16058
16063
|
React.createElement("div", { className: "sid-l-space-top-md" }),
|
|
16059
|
-
React.createElement("
|
|
16060
|
-
|
|
16061
|
-
React.createElement(FormattedHTMLMessage, { id: "schoolName", defaultMessage: "University / College name" }))),
|
|
16062
|
-
React.createElement(TypeaheadComponent, { className: isErrored ? 'sid-text-input--error' : '', countryCode: country, minimumSearchValueLength: getOptions().minimumOrganizationSearchLength, onChange: (choice) => onChange(choice), placeholder: placeholder || intl.formatMessage({ id: 'schoolNamePlaceholder', defaultMessage: 'University / College name*' }), programId: programId, value: value, inputHtmlId: "sid-college-name", openOrgSearchEnabled: verificationService.programTheme.openOrgSearchEnabled, orgSearchUrl: verificationService.programTheme.config.orgSearchUrl, orgSearchTags: searchTags, locale: locale, urlAddSchoolForm: urlAddSchoolForm }),
|
|
16064
|
+
React.createElement(FieldLabel, { text: React.createElement(FormattedHTMLMessage, { id: "schoolName", defaultMessage: "University / College name" }), htmlForLabel: "sid-college-name", id: "sid-college-name-label", displayClasses: placeholder && 'sid-h-screen-reader-only' }),
|
|
16065
|
+
React.createElement(TypeaheadComponent, { className: isErrored ? 'sid-text-input--error' : '', countryCode: country, minimumSearchValueLength: getOptions().minimumOrganizationSearchLength, onChange: (choice) => onChange(choice), placeholder: placeholder || intl.formatMessage({ id: 'schoolNamePlaceholder', defaultMessage: 'University / College name*' }), programId: programId, value: value, inputHtmlId: "sid-college-name", openOrgSearchEnabled: verificationService.programTheme.openOrgSearchEnabled, orgSearchUrl: verificationService.programTheme.config.orgSearchUrl, orgSearchTags: searchTags, locale: locale, urlAddSchoolForm: urlAddSchoolForm, isRequired: isRequired }),
|
|
16063
16066
|
isErrored ? (React.createElement("div", { className: "sid-field-error" },
|
|
16064
16067
|
React.createElement(FormattedHTMLMessage, { id: "errorId.invalidOrganization", defaultMessage: "You must select an organization from the list" }))) : null));
|
|
16065
16068
|
};
|
|
@@ -16158,20 +16161,17 @@ const BirthDate = ({ onChange, intl, isErrored, isRequired = true, errorId, valu
|
|
|
16158
16161
|
}
|
|
16159
16162
|
};
|
|
16160
16163
|
const monthFieldId = 'sid-birthdate__month';
|
|
16164
|
+
const fieldLabelId = 'sid-birthdate-label';
|
|
16161
16165
|
const errMsg = errorId ? (React.createElement("div", { className: "sid-field-error" },
|
|
16162
16166
|
React.createElement(FormattedHTMLMessage, { id: `errorId.${errorId}`, defaultMessage: "Invalid birth date" })))
|
|
16163
16167
|
: (React.createElement("div", { className: "sid-field-error" },
|
|
16164
16168
|
React.createElement(FormattedHTMLMessage, { id: "errorId.invalidBirthDate", defaultMessage: "Invalid birth date" })));
|
|
16165
16169
|
return (React.createElement("div", { className: "sid-field sid-birthdate" },
|
|
16166
16170
|
React.createElement("div", { className: "sid-l-space-top-md" }),
|
|
16167
|
-
React.createElement("
|
|
16168
|
-
React.createElement(
|
|
16169
|
-
React.createElement("div", { id: "sid-birthdate", className: `sid-field__label${isRequired ? ' sid-field__label--required' : ''}` },
|
|
16170
|
-
React.createElement(FormattedHTMLMessage, { id: "birthDate", defaultMessage: "Date of birth" })),
|
|
16171
|
-
React.createElement("div", { className: "sid-field__label-explanation" },
|
|
16172
|
-
React.createElement(FormattedHTMLMessage, { id: "verificationPurposesOnly", defaultMessage: "Used for verification purposes only" })))),
|
|
16171
|
+
React.createElement(FieldLabel, { text: React.createElement(FormattedHTMLMessage, { id: "birthDate", defaultMessage: "Date of birth" }), htmlForLabel: monthFieldId, id: fieldLabelId, displayClasses: "sid-field__label-with-explanation", isRequired: isRequired },
|
|
16172
|
+
React.createElement(FormattedHTMLMessage, { id: "verificationPurposesOnly", defaultMessage: "Used for verification purposes only" })),
|
|
16173
16173
|
React.createElement("div", { className: "sid-birthdate__inputs" },
|
|
16174
|
-
React.createElement(InputSelectComponent, { className: "sid-birthdate__month", fieldId: "birthDate", inputId: monthFieldId, isErrored: isErrored, options: months, onKeyDown: event => handleOnKeyDown(event), onChange: (choice) => {
|
|
16174
|
+
React.createElement(InputSelectComponent, { className: "sid-birthdate__month", fieldId: "birthDate", inputId: monthFieldId, fieldLabelId: fieldLabelId, isErrored: isErrored, options: months, onKeyDown: event => handleOnKeyDown(event), onChange: (choice) => {
|
|
16175
16175
|
if (choice) {
|
|
16176
16176
|
updateBirthMonth(choice.value);
|
|
16177
16177
|
}
|
|
@@ -16345,7 +16345,7 @@ const HowDoesVerifyingWorkComponent = ({ verificationService, initialVisibility
|
|
|
16345
16345
|
: null));
|
|
16346
16346
|
};
|
|
16347
16347
|
|
|
16348
|
-
const BaseCountryComponentWrapper = ({ verificationService, viewModel, intl,
|
|
16348
|
+
const BaseCountryComponentWrapper = ({ verificationService, viewModel, intl, viewModelDraftDecorator, }) => {
|
|
16349
16349
|
const countryChoices = getAvailableCountryChoices(verificationService.programTheme, intl);
|
|
16350
16350
|
const defaultCountryChoice = getDefaultCountryChoice(countryChoices);
|
|
16351
16351
|
const { fieldValidationErrors } = verificationService;
|
|
@@ -16388,13 +16388,10 @@ const BaseCountryComponentWrapper = ({ verificationService, viewModel, intl, nex
|
|
|
16388
16388
|
if (!hasMultipleCountries) {
|
|
16389
16389
|
return null;
|
|
16390
16390
|
}
|
|
16391
|
-
return (React.createElement(CountryComponent, { isRequired: true, options: countryChoices, value: viewModel.countryChoice, isErrored: Boolean(fieldValidationErrors.country),
|
|
16391
|
+
return (React.createElement(CountryComponent, { isRequired: true, options: countryChoices, value: viewModel.countryChoice, isErrored: Boolean(fieldValidationErrors.country), onChange: async (countryChoice) => {
|
|
16392
16392
|
const countryValue = countryChoice ? countryChoice.value : undefined;
|
|
16393
16393
|
updateCountryChoice(countryChoice);
|
|
16394
16394
|
updateFieldValidationErrorsByFieldId('country', countryValue, verificationService);
|
|
16395
|
-
if (nextFocusField && countryValue) {
|
|
16396
|
-
setFocus(nextFocusField);
|
|
16397
|
-
}
|
|
16398
16395
|
} }));
|
|
16399
16396
|
};
|
|
16400
16397
|
const CountryComponentWrapper = injectIntl(BaseCountryComponentWrapper);
|
|
@@ -16454,8 +16451,8 @@ const StepStudentPersonalInfo = ({ intl, verificationService }) => {
|
|
|
16454
16451
|
localeChoices.length > 1
|
|
16455
16452
|
? (React.createElement(ChangeLocaleComponent, { options: localeChoices, value: viewModel.localeChoice || defaultLocaleChoice, isErrored: false, onChange: (localeChoice) => updateLocale(localeChoice) }))
|
|
16456
16453
|
: null,
|
|
16457
|
-
React.createElement(CountryComponentWrapper, { verificationService: verificationService, viewModel: viewModel
|
|
16458
|
-
React.createElement(CollegeNameComponent, { value: verificationService.viewModel.organization, verificationService: verificationService, isErrored: !!fieldValidationErrors.organization, onChange: (choice) => {
|
|
16454
|
+
React.createElement(CountryComponentWrapper, { verificationService: verificationService, viewModel: viewModel }),
|
|
16455
|
+
React.createElement(CollegeNameComponent, { value: verificationService.viewModel.organization, verificationService: verificationService, isErrored: !!fieldValidationErrors.organization, isRequired: true, onChange: (choice) => {
|
|
16459
16456
|
updateViewModelOrganization(choice, verificationService);
|
|
16460
16457
|
updateFieldValidationErrorsByFieldId('organization', choice, verificationService);
|
|
16461
16458
|
} }),
|
|
@@ -16468,10 +16465,10 @@ const StepStudentPersonalInfo = ({ intl, verificationService }) => {
|
|
|
16468
16465
|
updateStudentViewModel('lastName', newValue);
|
|
16469
16466
|
updateFieldValidationErrorsByFieldId('lastName', newValue, verificationService);
|
|
16470
16467
|
} })),
|
|
16471
|
-
React.createElement(BirthDateComponent, { isErrored: !!fieldValidationErrors.birthDate, errorId: fieldValidationErrors.birthDate, onChange: (newValue) => {
|
|
16468
|
+
React.createElement(BirthDateComponent, { value: viewModel.birthDate, isErrored: !!fieldValidationErrors.birthDate, errorId: fieldValidationErrors.birthDate, isRequired: true, onChange: (newValue) => {
|
|
16472
16469
|
updateStudentViewModel('birthDate', newValue);
|
|
16473
16470
|
updateFieldValidationErrorsByFieldId('birthDate', newValue, verificationService);
|
|
16474
|
-
}
|
|
16471
|
+
} }),
|
|
16475
16472
|
React.createElement(EmailComponent, { value: viewModel.email, isErrored: !!fieldValidationErrors.email, explanation: (React.createElement(FormattedHTMLMessage, { id: "emailExplanation", defaultMessage: "Personal or school email is fine" })), onChange: (newValue) => {
|
|
16476
16473
|
updateStudentViewModel('email', newValue);
|
|
16477
16474
|
updateFieldValidationErrorsByFieldId('email', newValue, verificationService);
|
|
@@ -16480,7 +16477,7 @@ const StepStudentPersonalInfo = ({ intl, verificationService }) => {
|
|
|
16480
16477
|
? (React.createElement(PhoneNumberComponent, { isRequired: !!verificationService.programTheme.smsLoopEnabled, value: viewModel.phoneNumber, isErrored: !!fieldValidationErrors.phoneNumber, onChange: (newValue) => {
|
|
16481
16478
|
updateStudentViewModel('phoneNumber', newValue);
|
|
16482
16479
|
updateFieldValidationErrorsByFieldId('phoneNumber', newValue, verificationService);
|
|
16483
|
-
} }))
|
|
16480
|
+
}, selectedCountryCode: viewModel.countryChoice && viewModel.countryChoice.value }))
|
|
16484
16481
|
: null,
|
|
16485
16482
|
React.createElement(MarketConsentWrapperComponent, { verificationService: verificationService, isErrored: !!fieldValidationErrors.marketConsentValue, onChange: (newValue) => {
|
|
16486
16483
|
updateStudentViewModel('metadata', { ...verificationService.viewModel.metadata, marketConsentValue: newValue });
|
|
@@ -16504,11 +16501,7 @@ const PostalCodeInputComponent = injectIntl(PostalCodeInput);
|
|
|
16504
16501
|
|
|
16505
16502
|
const PostalCodeComponent = ({ value, isErrored, onChange, explanation, }) => (React.createElement("div", { className: "sid-field sid-postal-code" },
|
|
16506
16503
|
React.createElement("div", { className: "sid-l-space-top-md" }),
|
|
16507
|
-
React.createElement("
|
|
16508
|
-
React.createElement("div", { className: "sid-field__label-with-explanation sid-l-space-btm-sm" },
|
|
16509
|
-
React.createElement("div", { className: "sid-field__label sid-field__label--required" },
|
|
16510
|
-
React.createElement(FormattedMessage, { id: "postalCode", defaultMessage: "Postal Code" })),
|
|
16511
|
-
explanation ? (React.createElement("div", { className: "sid-field__label-explanation" }, explanation)) : null)),
|
|
16504
|
+
React.createElement(FieldLabel, { text: React.createElement(FormattedHTMLMessage, { id: "postalCode", defaultMessage: "Postal Code" }), htmlForLabel: "sid-postal-code", id: "sid-postal-code-label", displayClasses: "sid-field__label-with-explanation" }, explanation && explanation),
|
|
16512
16505
|
React.createElement(PostalCodeInputComponent, { value: value, isValid: !isErrored, onChange: onChange }),
|
|
16513
16506
|
isErrored ? (React.createElement("div", { className: "sid-field-error" },
|
|
16514
16507
|
React.createElement(FormattedHTMLMessage, { id: "errorId.invalidPostalCode", defaultMessage: "Invalid postal code" }))) : null));
|
|
@@ -16571,7 +16564,7 @@ const StepSeniorPersonalInfo = ({ verificationService }) => {
|
|
|
16571
16564
|
? (React.createElement(PhoneNumberComponent, { isRequired: !!verificationService.programTheme.smsLoopEnabled, value: viewModel.phoneNumber, isErrored: !!fieldValidationErrors.phoneNumber, onChange: (newValue) => {
|
|
16572
16565
|
updateSeniorViewModel('phoneNumber', newValue);
|
|
16573
16566
|
updateFieldValidationErrorsByFieldId('phoneNumber', newValue, verificationService);
|
|
16574
|
-
} }))
|
|
16567
|
+
}, selectedCountryCode: viewModel.countryChoice && viewModel.countryChoice.value }))
|
|
16575
16568
|
: null,
|
|
16576
16569
|
React.createElement(MarketConsentWrapperComponent, { verificationService: verificationService, isErrored: !!fieldValidationErrors.marketConsentValue, onChange: (newValue) => {
|
|
16577
16570
|
updateSeniorViewModel('metadata', { ...verificationService.viewModel.metadata, marketConsentValue: newValue });
|
|
@@ -16609,10 +16602,7 @@ const carrierConsentValueValidator = (countryChoiceValue) => (value, programThem
|
|
|
16609
16602
|
|
|
16610
16603
|
const City = ({ value, isErrored, onChange, intl, onKeyDown = undefined, placeholder = '', }) => (React.createElement("div", { className: "sid-field sid-city" },
|
|
16611
16604
|
React.createElement("div", { className: "sid-l-space-top-md" }),
|
|
16612
|
-
React.createElement("
|
|
16613
|
-
React.createElement("div", { className: `sid-field__label sid-l-space-btm-sm ${placeholder ? 'sid-h-screen-reader-only' : ''}` },
|
|
16614
|
-
React.createElement("div", { className: "sid-field__label sid-field__label--required" },
|
|
16615
|
-
React.createElement(FormattedHTMLMessage, { id: "city", defaultMessage: "City" })))),
|
|
16605
|
+
React.createElement(FieldLabel, { text: React.createElement(FormattedHTMLMessage, { id: "city", defaultMessage: "City" }), htmlForLabel: "sid-city", id: "sid-city-label", displayClasses: placeholder && 'sid-h-screen-reader-only' }),
|
|
16616
16606
|
React.createElement(InputTextComponent, { id: "city", isErrored: isErrored, onChange: e => onChange(e.target.value), onKeyDown: typeof onKeyDown === 'function' ? e => onKeyDown(e) : undefined, placeholder: placeholder || intl.formatMessage({ id: 'cityPlaceholder', defaultMessage: 'City*' }), value: value }),
|
|
16617
16607
|
isErrored ? (React.createElement("div", { className: "sid-field-error" },
|
|
16618
16608
|
React.createElement(FormattedHTMLMessage, { id: "errorId.invalidCity", defaultMessage: "Invalid city" }))) : null));
|
|
@@ -16620,10 +16610,7 @@ const CityComponent = injectIntl(City);
|
|
|
16620
16610
|
|
|
16621
16611
|
const Address = ({ value, isErrored, onChange, intl, onKeyDown = undefined, placeholder = '', }) => (React.createElement("div", { className: "sid-field sid-address" },
|
|
16622
16612
|
React.createElement("div", { className: "sid-l-space-top-md" }),
|
|
16623
|
-
React.createElement("
|
|
16624
|
-
React.createElement("div", { className: `sid-field__label sid-l-space-btm-sm ${placeholder ? 'sid-h-screen-reader-only' : ''}` },
|
|
16625
|
-
React.createElement("div", { className: "sid-field__label sid-field__label--required" },
|
|
16626
|
-
React.createElement(FormattedHTMLMessage, { id: "address", defaultMessage: "Address" })))),
|
|
16613
|
+
React.createElement(FieldLabel, { text: React.createElement(FormattedHTMLMessage, { id: "address", defaultMessage: "Address" }), htmlForLabel: "sid-address", id: "sid-address-label", displayClasses: placeholder && 'sid-h-screen-reader-only' }),
|
|
16627
16614
|
React.createElement(InputTextComponent, { id: "address", isErrored: isErrored, onChange: e => onChange(e.target.value), onKeyDown: typeof onKeyDown === 'function' ? e => onKeyDown(e) : undefined, placeholder: placeholder || intl.formatMessage({ id: 'addressPlaceholder', defaultMessage: 'Address*' }), value: value }),
|
|
16628
16615
|
isErrored ? (React.createElement("div", { className: "sid-field-error" },
|
|
16629
16616
|
React.createElement(FormattedHTMLMessage, { id: "errorId.invalidAddress", defaultMessage: "Invalid address" }))) : null));
|
|
@@ -16741,10 +16728,10 @@ const StepAgePersonalInfo = ({ verificationService, intl }) => {
|
|
|
16741
16728
|
updateFieldValidationErrorsByFieldId('email', newValue, verificationService);
|
|
16742
16729
|
}, onKeyDown: event => handleEmailOnKeyDown(event) }),
|
|
16743
16730
|
(displayPhoneNumber(safeCountryValue, smsLoopEnabled) || isSmsNotifierConfigured)
|
|
16744
|
-
&& (React.createElement(PhoneNumberComponent, { value: viewModel.phoneNumber,
|
|
16731
|
+
&& (React.createElement(PhoneNumberComponent, { value: viewModel.phoneNumber, isRequired: (verificationService.programTheme.smsLoopEnabled) || safeCountryValue !== 'US', isErrored: !!fieldValidationErrors.phoneNumber, displaySmsConsent: isSmsNotifierConfigured, onChange: (value) => {
|
|
16745
16732
|
updateAgeViewModel('phoneNumber', value);
|
|
16746
16733
|
updateFieldValidationErrorsByFieldId('phoneNumber', value, verificationService);
|
|
16747
|
-
}, errorId: fieldValidationErrors.phoneNumber, requireCarrierConsent: verificationService.programTheme.smsLoopEnabled || safeCountryValue !== 'US', onCarrierConsentChange: onCarrierConsentChange, carrierConsent: Boolean(viewModel.metadata && viewModel.metadata.carrierConsentValue) })),
|
|
16734
|
+
}, errorId: fieldValidationErrors.phoneNumber, requireCarrierConsent: verificationService.programTheme.smsLoopEnabled || safeCountryValue !== 'US', onCarrierConsentChange: onCarrierConsentChange, carrierConsent: Boolean(viewModel.metadata && viewModel.metadata.carrierConsentValue), selectedCountryCode: viewModel.countryChoice && viewModel.countryChoice.value })),
|
|
16748
16735
|
React.createElement(MarketConsentWrapperComponent, { verificationService: verificationService, isErrored: !!fieldValidationErrors.marketConsentValue, onChange: (newValue) => {
|
|
16749
16736
|
updateAgeViewModel('metadata', { ...verificationService.viewModel.metadata, marketConsentValue: newValue });
|
|
16750
16737
|
updateFieldValidationErrorsByFieldId('marketConsentValue', newValue, verificationService);
|
|
@@ -16772,9 +16759,7 @@ const TeacherSchool = ({ value, isErrored, onChange, verificationService, intl,
|
|
|
16772
16759
|
const searchTags = getOrgSearchCountryTags(verificationService.programTheme, country);
|
|
16773
16760
|
return (React.createElement("div", { className: "sid-field sid-teacher-school-id" },
|
|
16774
16761
|
React.createElement("div", { className: "sid-l-space-top-md" }),
|
|
16775
|
-
React.createElement("
|
|
16776
|
-
React.createElement("div", { id: `${id}-label`, className: "sid-field__label sid-field__label--required sid-l-space-btm-sm" },
|
|
16777
|
-
React.createElement(FormattedHTMLMessage, { id: "schoolName", defaultMessage: "School name" }))),
|
|
16762
|
+
React.createElement(FieldLabel, { text: React.createElement(FormattedHTMLMessage, { id: "schoolName", defaultMessage: "School name" }), htmlForLabel: id, id: `${id}-label`, displayClasses: placeholder && 'sid-h-screen-reader-only' }),
|
|
16778
16763
|
React.createElement(TypeaheadComponent, { className: isErrored ? 'sid-text-input--error' : '', countryCode: country, onChange: (choice) => onChange(choice), minimumSearchValueLength: getOptions().minimumOrganizationSearchLength, placeholder: placeholder || intl.formatMessage({ id: 'schoolNamePlaceholder', defaultMessage: 'University / College name*' }), programId: programId, value: value, inputHtmlId: id, openOrgSearchEnabled: verificationService.programTheme.openOrgSearchEnabled, orgSearchUrl: verificationService.programTheme.config.orgSearchUrl, orgSearchTags: searchTags, locale: locale, urlAddSchoolForm: urlAddSchoolForm, isRequired: true }),
|
|
16779
16764
|
isErrored ? (React.createElement("div", { className: "sid-field-error" },
|
|
16780
16765
|
React.createElement(FormattedHTMLMessage, { id: "errorId.invalidOrganization", defaultMessage: "You must select an organization from the list" }))) : null));
|
|
@@ -16836,7 +16821,7 @@ const StepTeacherPersonalInfo = ({ intl, verificationService }) => {
|
|
|
16836
16821
|
localeChoices.length > 1
|
|
16837
16822
|
? (React.createElement(ChangeLocaleComponent, { options: localeChoices, value: viewModel.localeChoice || defaultLocaleChoice, isErrored: false, onChange: (localeChoice) => updateLocale(localeChoice) }))
|
|
16838
16823
|
: null,
|
|
16839
|
-
React.createElement(CountryComponentWrapper, { verificationService: verificationService, viewModel: viewModel
|
|
16824
|
+
React.createElement(CountryComponentWrapper, { verificationService: verificationService, viewModel: viewModel }),
|
|
16840
16825
|
React.createElement(TeacherSchoolComponent, { value: verificationService.viewModel.organization, verificationService: verificationService, isErrored: !!fieldValidationErrors.organization, onChange: (choice) => {
|
|
16841
16826
|
updateViewModelOrganization(choice, verificationService);
|
|
16842
16827
|
updateFieldValidationErrorsByFieldId('organization', choice, verificationService);
|
|
@@ -16864,7 +16849,7 @@ const StepTeacherPersonalInfo = ({ intl, verificationService }) => {
|
|
|
16864
16849
|
? (React.createElement(PhoneNumberComponent, { isRequired: !!verificationService.programTheme.smsLoopEnabled, value: viewModel.phoneNumber, isErrored: !!fieldValidationErrors.phoneNumber, onChange: (newValue) => {
|
|
16865
16850
|
updateTeacherViewModel('phoneNumber', newValue);
|
|
16866
16851
|
updateFieldValidationErrorsByFieldId('phoneNumber', newValue, verificationService);
|
|
16867
|
-
} }))
|
|
16852
|
+
}, selectedCountryCode: viewModel.countryChoice && viewModel.countryChoice.value }))
|
|
16868
16853
|
: null,
|
|
16869
16854
|
shouldCollectPostalCode(verificationService.programTheme, viewModel)
|
|
16870
16855
|
? (React.createElement(PostalCodeComponent, { isErrored: !!fieldValidationErrors.postalCode, onChange: (newValue) => {
|
|
@@ -16892,10 +16877,7 @@ const MemberId = ({ value, isErrored, onChange, explanation, intl, placeholder =
|
|
|
16892
16877
|
: '');
|
|
16893
16878
|
return (React.createElement("div", { className: "sid-field sid-member-id" },
|
|
16894
16879
|
React.createElement("div", { className: "sid-l-space-top-md" }),
|
|
16895
|
-
React.createElement(
|
|
16896
|
-
React.createElement("div", { className: `sid-field__label-with-explanation sid-l-space-btm-sm ${placeholder ? 'sid-h-screen-reader-only' : ''}` },
|
|
16897
|
-
React.createElement("div", { className: `sid-field__label${isRequired ? ' sid-field__label--required' : ''} ` }, label || (React.createElement(FormattedHTMLMessage, { id: "memberId", defaultMessage: "ID Number" }))),
|
|
16898
|
-
React.createElement("div", { className: "sid-field__label-explanation" }, explanation || getDefaultExplanation()))),
|
|
16880
|
+
React.createElement(FieldLabel, { text: label || React.createElement(FormattedHTMLMessage, { id: "memberId", defaultMessage: "ID Number" }), htmlForLabel: "sid-member-id", id: "sid-member-id-label", displayClasses: `sid-field__label-with-explanation${placeholder && ' sid-h-screen-reader-only'}`, isRequired: isRequired }, explanation || getDefaultExplanation()),
|
|
16899
16881
|
React.createElement(InputTextComponent, { id: "member-id", isErrored: isErrored, onChange: e => onChange(e.target.value), placeholder: placeholder || intl.formatMessage({ id: 'memberIdPlaceholder', defaultMessage: 'ID Number*' }), refId: "memberId", value: value }),
|
|
16900
16882
|
isErrored ? (React.createElement("div", { className: "sid-field-error" },
|
|
16901
16883
|
React.createElement(FormattedHTMLMessage, { id: "errorId.invalidMemberId", defaultMessage: "Invalid ID Number" }))) : null));
|
|
@@ -16906,9 +16888,7 @@ const MembershipOrganization = ({ value, isErrored, onChange, verificationServic
|
|
|
16906
16888
|
const { programId } = verificationService;
|
|
16907
16889
|
return (React.createElement("div", { className: "sid-field sid-membership-id" },
|
|
16908
16890
|
React.createElement("div", { className: "sid-l-space-top-md" }),
|
|
16909
|
-
React.createElement("
|
|
16910
|
-
React.createElement("div", { className: "sid-field__label sid-field__label--required sid-l-space-btm-sm" },
|
|
16911
|
-
React.createElement(FormattedHTMLMessage, { id: "organization", defaultMessage: "Organization name" }))),
|
|
16891
|
+
React.createElement(FieldLabel, { text: React.createElement(FormattedHTMLMessage, { id: "organization", defaultMessage: "Organization" }), htmlForLabel: "sid-membership", id: "sid-membership-label", displayClasses: placeholder && 'sid-h-screen-reader-only' }),
|
|
16912
16892
|
React.createElement(TypeaheadComponent, { className: isErrored ? 'sid-text-input--error' : '', countryCode: getSafe(() => verificationService.viewModel.countryChoice.value), onChange: (choice) => onChange(choice), minimumSearchValueLength: getOptions().minimumOrganizationSearchLength, placeholder: placeholder || intl.formatMessage({ id: 'organizationNamePlaceholder', defaultMessage: 'Organization*' }), programId: programId, value: value, inputHtmlId: "sid-membership", openOrgSearchEnabled: verificationService.programTheme.openOrgSearchEnabled, orgSearchUrl: verificationService.programTheme.config.orgSearchUrl }),
|
|
16913
16893
|
isErrored ? (React.createElement("div", { className: "sid-field-error" },
|
|
16914
16894
|
React.createElement(FormattedHTMLMessage, { id: "errorId.invalidOrganization", defaultMessage: "You must select an organization from the list" }))) : null));
|
|
@@ -16960,7 +16940,7 @@ const StepMemberPersonalInfo = ({ intl, verificationService }) => {
|
|
|
16960
16940
|
localeChoices.length > 1
|
|
16961
16941
|
? (React.createElement(ChangeLocaleComponent, { options: localeChoices, value: viewModel.localeChoice || defaultLocaleChoice, isErrored: false, onChange: (localeChoice) => updateLocale(localeChoice) }))
|
|
16962
16942
|
: null,
|
|
16963
|
-
React.createElement(CountryComponentWrapper, { verificationService: verificationService, viewModel: viewModel
|
|
16943
|
+
React.createElement(CountryComponentWrapper, { verificationService: verificationService, viewModel: viewModel }),
|
|
16964
16944
|
React.createElement(MembershipOrganizationComponent, { value: verificationService.viewModel.organization, verificationService: verificationService, isErrored: !!fieldValidationErrors.organization, onChange: (choice) => {
|
|
16965
16945
|
updateViewModelOrganization(choice, verificationService);
|
|
16966
16946
|
updateFieldValidationErrorsByFieldId('organization', choice, verificationService);
|
|
@@ -16990,7 +16970,7 @@ const StepMemberPersonalInfo = ({ intl, verificationService }) => {
|
|
|
16990
16970
|
? (React.createElement(PhoneNumberComponent, { isRequired: !!verificationService.programTheme.smsLoopEnabled, value: viewModel.phoneNumber, isErrored: !!fieldValidationErrors.phoneNumber, onChange: (newValue) => {
|
|
16991
16971
|
updateMemberViewModel('phoneNumber', newValue);
|
|
16992
16972
|
updateFieldValidationErrorsByFieldId('phoneNumber', newValue, verificationService);
|
|
16993
|
-
} }))
|
|
16973
|
+
}, selectedCountryCode: viewModel.countryChoice && viewModel.countryChoice.value }))
|
|
16994
16974
|
: null,
|
|
16995
16975
|
React.createElement(MarketConsentWrapperComponent, { verificationService: verificationService, isErrored: !!fieldValidationErrors.marketConsentValue, onChange: (newValue) => {
|
|
16996
16976
|
updateMemberViewModel('metadata', { ...verificationService.viewModel.metadata, marketConsentValue: newValue });
|
|
@@ -17018,14 +16998,15 @@ const compareLabel = (a, b) => {
|
|
|
17018
16998
|
};
|
|
17019
16999
|
const SortByLabel = (choices) => choices.sort(compareLabel);
|
|
17020
17000
|
|
|
17021
|
-
const MilitaryStatus = ({ value, isErrored, options, onChange, intl, placeholder = '', }) =>
|
|
17022
|
-
|
|
17023
|
-
React.createElement("
|
|
17024
|
-
React.createElement("div", {
|
|
17025
|
-
|
|
17026
|
-
|
|
17027
|
-
|
|
17028
|
-
|
|
17001
|
+
const MilitaryStatus = ({ value, isErrored, options, onChange, intl, placeholder = '', }) => {
|
|
17002
|
+
const inputId = 'sid-military-status';
|
|
17003
|
+
return (React.createElement("div", { className: `sid-field ${inputId}` },
|
|
17004
|
+
React.createElement("div", { className: "sid-l-space-top-md" }),
|
|
17005
|
+
React.createElement(FieldLabel, { text: React.createElement(FormattedHTMLMessage, { id: "status", defaultMessage: "Status" }), htmlForLabel: inputId, id: `${inputId}-label`, displayClasses: placeholder && 'sid-h-screen-reader-only' }),
|
|
17006
|
+
React.createElement(InputSelectComponent, { fieldId: "status", inputId: inputId, fieldLabelId: `${inputId}-label`, isErrored: isErrored, options: SortByLabel(options), onChange: (status) => onChange(status), value: value, placeholder: placeholder || intl.formatMessage({ id: 'statusPlaceholder', defaultMessage: 'Status*' }) }),
|
|
17007
|
+
isErrored ? (React.createElement("div", { className: "sid-field-error" },
|
|
17008
|
+
React.createElement(FormattedHTMLMessage, { id: "errorId.invalidStatus", defaultMessage: "Invalid military status" }))) : null));
|
|
17009
|
+
};
|
|
17029
17010
|
const MilitaryStatusComponent = injectIntl(MilitaryStatus);
|
|
17030
17011
|
|
|
17031
17012
|
const orgsInStatus = (status) => (org) => {
|
|
@@ -17059,6 +17040,7 @@ const updateMilitaryViewModel = (key, value, verificationService, availableStatu
|
|
|
17059
17040
|
const BranchOfService = ({ autoFocus, onChange, value, isErrored, organizations, verificationService, intl, placeholder = '', }) => {
|
|
17060
17041
|
let options = [];
|
|
17061
17042
|
const { status } = verificationService.viewModel;
|
|
17043
|
+
const inputId = 'sid-branch-of-service';
|
|
17062
17044
|
if (organizations)
|
|
17063
17045
|
options = organizations.filter(orgsInStatus(status)).map(orgToOption);
|
|
17064
17046
|
const handleStateChange = (selectedOrgOption, onChange) => {
|
|
@@ -17075,12 +17057,10 @@ const BranchOfService = ({ autoFocus, onChange, value, isErrored, organizations,
|
|
|
17075
17057
|
});
|
|
17076
17058
|
}
|
|
17077
17059
|
};
|
|
17078
|
-
return (React.createElement("div", { className:
|
|
17060
|
+
return (React.createElement("div", { className: `sid-field ${inputId}-id` },
|
|
17079
17061
|
React.createElement("div", { className: "sid-l-space-top-md" }),
|
|
17080
|
-
React.createElement("
|
|
17081
|
-
|
|
17082
|
-
React.createElement(FormattedHTMLMessage, { id: "branchOfService", defaultMessage: "Branch Of Service" }))),
|
|
17083
|
-
React.createElement(InputSelectComponent, { autoFocus: autoFocus, fieldId: "organization", inputId: "sid-branch-of-service", isErrored: isErrored, options: SortByLabel(options), onChange: (branch) => handleStateChange(branch, onChange), value: value, placeholder: placeholder || intl.formatMessage({ id: 'branchOfServicePlaceholder', defaultMessage: 'Branch Of Service*' }) }),
|
|
17062
|
+
React.createElement(FieldLabel, { text: React.createElement(FormattedHTMLMessage, { id: "branchOfService", defaultMessage: "Branch Of Service" }), htmlForLabel: inputId, id: `${inputId}-label`, displayClasses: placeholder && 'sid-h-screen-reader-only' }),
|
|
17063
|
+
React.createElement(InputSelectComponent, { autoFocus: autoFocus, fieldId: "organization", inputId: inputId, fieldLabelId: `${inputId}-label`, isErrored: isErrored, options: SortByLabel(options), onChange: (branch) => handleStateChange(branch, onChange), value: value, placeholder: placeholder || intl.formatMessage({ id: 'branchOfServicePlaceholder', defaultMessage: 'Branch Of Service*' }) }),
|
|
17084
17064
|
isErrored ? (React.createElement("div", { className: "sid-field-error" },
|
|
17085
17065
|
React.createElement(FormattedHTMLMessage, { id: "errorId.invalidOrganization", defaultMessage: "You must select an organization from the list" }))) : null));
|
|
17086
17066
|
};
|
|
@@ -17130,7 +17110,7 @@ const StepActiveMilitaryPersonalInfo = ({ intl, verificationService }) => {
|
|
|
17130
17110
|
React.createElement("div", { className: "sid-header__how-verifying-works sid-l-horz-center" },
|
|
17131
17111
|
React.createElement(HowDoesVerifyingWorkComponent, { verificationService: verificationService }),
|
|
17132
17112
|
React.createElement(RewardsRemainingComponent, { verificationService: verificationService })))),
|
|
17133
|
-
React.createElement(CountryComponentWrapper, { verificationService: verificationService, viewModel: viewModel
|
|
17113
|
+
React.createElement(CountryComponentWrapper, { verificationService: verificationService, viewModel: viewModel }),
|
|
17134
17114
|
availableStatuses
|
|
17135
17115
|
? (React.createElement(MilitaryStatusComponent, { value: {
|
|
17136
17116
|
value: viewModel.status,
|
|
@@ -17170,7 +17150,7 @@ const StepActiveMilitaryPersonalInfo = ({ intl, verificationService }) => {
|
|
|
17170
17150
|
? (React.createElement(PhoneNumberComponent, { isRequired: !!verificationService.programTheme.smsLoopEnabled, value: viewModel.phoneNumber, isErrored: !!fieldValidationErrors.phoneNumber, onChange: (newValue) => {
|
|
17171
17151
|
updateActiveMilitaryViewModel('phoneNumber', newValue);
|
|
17172
17152
|
updateFieldValidationErrorsByFieldId('phoneNumber', newValue, verificationService);
|
|
17173
|
-
} }))
|
|
17153
|
+
}, selectedCountryCode: viewModel.countryChoice && viewModel.countryChoice.value }))
|
|
17174
17154
|
: null,
|
|
17175
17155
|
React.createElement(MarketConsentWrapperComponent, { verificationService: verificationService, isErrored: !!fieldValidationErrors.marketConsentValue, onChange: (newValue) => {
|
|
17176
17156
|
updateActiveMilitaryViewModel('metadata', { ...verificationService.viewModel.metadata, marketConsentValue: newValue });
|
|
@@ -17193,6 +17173,7 @@ const DischargeDate = ({ onChange, intl, isErrored, value, }) => {
|
|
|
17193
17173
|
const dischargeDateDay = 1;
|
|
17194
17174
|
const minDischargeYear = 1900;
|
|
17195
17175
|
const thisYear = new Date().getFullYear();
|
|
17176
|
+
const inputId = 'sid-discharge-date';
|
|
17196
17177
|
const months = [
|
|
17197
17178
|
{ value: '1', label: intl.formatMessage({ id: 'dateTime.january', defaultMessage: 'January' }) },
|
|
17198
17179
|
{ value: '2', label: intl.formatMessage({ id: 'dateTime.february', defaultMessage: 'February' }) },
|
|
@@ -17242,16 +17223,12 @@ const DischargeDate = ({ onChange, intl, isErrored, value, }) => {
|
|
|
17242
17223
|
}
|
|
17243
17224
|
}
|
|
17244
17225
|
};
|
|
17245
|
-
return (React.createElement("div", { className:
|
|
17226
|
+
return (React.createElement("div", { className: `sid-field ${inputId}` },
|
|
17246
17227
|
React.createElement("div", { className: "sid-l-space-top-md" }),
|
|
17247
|
-
React.createElement("
|
|
17248
|
-
React.createElement(
|
|
17249
|
-
|
|
17250
|
-
|
|
17251
|
-
React.createElement("div", { className: "sid-field__label-explanation" },
|
|
17252
|
-
React.createElement(FormattedHTMLMessage, { id: "verificationPurposesOnly", defaultMessage: "Used for verification purposes only" })))),
|
|
17253
|
-
React.createElement("div", { className: "sid-discharge-date__inputs" },
|
|
17254
|
-
React.createElement(InputSelectComponent, { className: "sid-discharge-date__month", fieldId: "dischargeDate", inputId: "sid-discharge-date__month", isErrored: isErrored, options: months, onKeyDown: event => handleOnKeyDown(event), onChange: (choice) => {
|
|
17228
|
+
React.createElement(FieldLabel, { text: React.createElement(FormattedHTMLMessage, { id: "dischargeDate", defaultMessage: "Discharge date" }), htmlForLabel: `${inputId}__month`, id: `${inputId}-label`, displayClasses: "sid-field__label-with-explanation" },
|
|
17229
|
+
React.createElement(FormattedHTMLMessage, { id: "verificationPurposesOnly", defaultMessage: "Used for verification purposes only" })),
|
|
17230
|
+
React.createElement("div", { className: `${inputId}__inputs` },
|
|
17231
|
+
React.createElement(InputSelectComponent, { className: `${inputId}__month`, fieldId: "dischargeDate", inputId: `${inputId}__month`, fieldLabelId: `${inputId}-label`, isErrored: isErrored, options: months, onKeyDown: event => handleOnKeyDown(event), onChange: (choice) => {
|
|
17255
17232
|
if (choice) {
|
|
17256
17233
|
updateDischargeMonth(choice.value);
|
|
17257
17234
|
}
|
|
@@ -17259,8 +17236,8 @@ const DischargeDate = ({ onChange, intl, isErrored, value, }) => {
|
|
|
17259
17236
|
// clear the discharge month
|
|
17260
17237
|
updateDischargeMonth(null);
|
|
17261
17238
|
}
|
|
17262
|
-
}, placeholder: intl.formatMessage({ id: 'dateTime.month', defaultMessage: 'Month' }), suppressPlaceholder: false, value: dischargeDateMonth ? months[dischargeDateMonth - 1] : undefined, buttonRef: "inputSelectButtonDischargeDate" }),
|
|
17263
|
-
React.createElement(InputTextComponent, { className:
|
|
17239
|
+
}, placeholder: intl.formatMessage({ id: 'dateTime.month', defaultMessage: 'Month' }), suppressPlaceholder: false, value: dischargeDateMonth ? months[dischargeDateMonth - 1] : undefined, buttonRef: "inputSelectButtonDischargeDate", isRequired: true }),
|
|
17240
|
+
React.createElement(InputTextComponent, { className: `${inputId}__year`, id: "discharge-date-year", isErrored: isErrored, max: thisYear, min: minDischargeYear, onBlur: getDischargeDate, onChange: e => updateDischargeYear(e.target.value), pattern: "\\d*", placeholder: intl.formatMessage({ id: 'dateTime.year', defaultMessage: 'Year' }), hidePlaceholder: false, refId: "dischargeDateYear", required: true, value: dischargeDateYear || '' })),
|
|
17264
17241
|
isErrored ? (React.createElement("div", { className: "sid-field-error" },
|
|
17265
17242
|
React.createElement(FormattedHTMLMessage, { id: "errorId.invalidDischargeDate", defaultMessage: "Invalid discharge date" }))) : null));
|
|
17266
17243
|
};
|
|
@@ -17313,7 +17290,7 @@ const StepInactiveMilitaryPersonalInfo = ({ intl, verificationService }) => {
|
|
|
17313
17290
|
"\u00A0",
|
|
17314
17291
|
React.createElement(HowDoesVerifyingWorkComponent, { verificationService: verificationService }),
|
|
17315
17292
|
React.createElement(RewardsRemainingComponent, { verificationService: verificationService })))),
|
|
17316
|
-
React.createElement(CountryComponentWrapper, { verificationService: verificationService, viewModel: viewModel
|
|
17293
|
+
React.createElement(CountryComponentWrapper, { verificationService: verificationService, viewModel: viewModel }),
|
|
17317
17294
|
availableStatuses
|
|
17318
17295
|
? (React.createElement(MilitaryStatusComponent, { value: {
|
|
17319
17296
|
value: viewModel.status,
|
|
@@ -17355,7 +17332,7 @@ const StepInactiveMilitaryPersonalInfo = ({ intl, verificationService }) => {
|
|
|
17355
17332
|
? (React.createElement(PhoneNumberComponent, { isRequired: !!verificationService.programTheme.smsLoopEnabled, value: viewModel.phoneNumber, isErrored: !!fieldValidationErrors.phoneNumber, onChange: (newValue) => {
|
|
17356
17333
|
updateInactiveMilitaryViewModel('phoneNumber', newValue);
|
|
17357
17334
|
updateFieldValidationErrorsByFieldId('phoneNumber', newValue, verificationService);
|
|
17358
|
-
} }))
|
|
17335
|
+
}, selectedCountryCode: viewModel.countryChoice && viewModel.countryChoice.value }))
|
|
17359
17336
|
: null,
|
|
17360
17337
|
React.createElement(MarketConsentWrapperComponent, { verificationService: verificationService, isErrored: !!fieldValidationErrors.marketConsentValue, onChange: (newValue) => {
|
|
17361
17338
|
updateInactiveMilitaryViewModel('metadata', { ...verificationService.viewModel.metadata, marketConsentValue: newValue });
|
|
@@ -17371,23 +17348,22 @@ const StepInactiveMilitaryPersonalInfo = ({ intl, verificationService }) => {
|
|
|
17371
17348
|
};
|
|
17372
17349
|
const StepInactiveMilitaryPersonalInfoComponent = injectIntl(StepInactiveMilitaryPersonalInfo);
|
|
17373
17350
|
|
|
17374
|
-
const FirstResponderStatus = ({ value, isErrored, options, onChange, placeholder = '', intl, onKeyDown = undefined, }) =>
|
|
17375
|
-
|
|
17376
|
-
React.createElement("
|
|
17377
|
-
React.createElement("div", {
|
|
17378
|
-
|
|
17379
|
-
|
|
17380
|
-
|
|
17381
|
-
|
|
17351
|
+
const FirstResponderStatus = ({ value, isErrored, options, onChange, placeholder = '', intl, onKeyDown = undefined, }) => {
|
|
17352
|
+
const inputId = 'sid-first-responder-status';
|
|
17353
|
+
return (React.createElement("div", { className: `sid-field ${inputId}` },
|
|
17354
|
+
React.createElement("div", { className: "sid-l-space-top-md" }),
|
|
17355
|
+
React.createElement(FieldLabel, { text: React.createElement(FormattedHTMLMessage, { id: "status", defaultMessage: "Status" }), htmlForLabel: `${inputId}`, id: `${inputId}-label`, displayClasses: placeholder && 'sid-h-screen-reader-only' }),
|
|
17356
|
+
React.createElement(InputSelectComponent, { fieldId: "status", inputId: inputId, fieldLabelId: `${inputId}-label`, isErrored: isErrored, options: options, onChange: (status) => onChange(status), onKeyDown: onKeyDown, value: value, placeholder: placeholder || intl.formatMessage({ id: 'statusPlaceholder', defaultMessage: 'Status*' }) }),
|
|
17357
|
+
isErrored ? (React.createElement("div", { className: "sid-field-error" },
|
|
17358
|
+
React.createElement(FormattedHTMLMessage, { id: "errorId.invalidStatus", defaultMessage: "Invalid first responder status" }))) : null));
|
|
17359
|
+
};
|
|
17382
17360
|
const FirstResponderStatusComponent = injectIntl(FirstResponderStatus);
|
|
17383
17361
|
|
|
17384
17362
|
const FirstResponderOrganization = ({ onChange, value, isErrored, verificationService, intl, placeholder = '', }) => {
|
|
17385
17363
|
const { programId } = verificationService;
|
|
17386
17364
|
return (React.createElement("div", { className: "sid-field sid-first-responder-organization-id" },
|
|
17387
17365
|
React.createElement("div", { className: "sid-l-space-top-md" }),
|
|
17388
|
-
React.createElement("
|
|
17389
|
-
React.createElement("div", { id: "sid-first-responder-organization-label", className: "sid-field__label sid-field__label--required sid-l-space-btm-sm" },
|
|
17390
|
-
React.createElement(FormattedHTMLMessage, { id: "organization", defaultMessage: "Organization" }))),
|
|
17366
|
+
React.createElement(FieldLabel, { text: React.createElement(FormattedHTMLMessage, { id: "organization", defaultMessage: "Organization" }), htmlForLabel: "sid-first-responder-organization", id: "sid-first-responder-organization-label", displayClasses: placeholder && 'sid-h-screen-reader-only' }),
|
|
17391
17367
|
React.createElement(TypeaheadComponent, { className: isErrored ? 'sid-text-input--error' : '', countryCode: getSafe(() => verificationService.viewModel.countryChoice.value), minimumSearchValueLength: getOptions().minimumOrganizationSearchLength, onChange: (choice) => onChange(choice), placeholder: placeholder || intl.formatMessage({ id: 'organizationPlaceholder', defaultMessage: 'Organization*' }), programId: programId, value: value, inputHtmlId: "sid-first-responder-organization", openOrgSearchEnabled: verificationService.programTheme.openOrgSearchEnabled, orgSearchUrl: verificationService.programTheme.config.orgSearchUrl }),
|
|
17392
17368
|
isErrored ? (React.createElement("div", { className: "sid-field-error" },
|
|
17393
17369
|
React.createElement(FormattedHTMLMessage, { id: "errorId.invalidOrganization", defaultMessage: "You must select an organization from the list" }))) : null));
|
|
@@ -17419,12 +17395,6 @@ const StepFirstResponderPersonalInfo = ({ intl, verificationService }) => {
|
|
|
17419
17395
|
});
|
|
17420
17396
|
return availableStatuses;
|
|
17421
17397
|
};
|
|
17422
|
-
const handleFirstResponderStatusOnKeyDown = (event) => {
|
|
17423
|
-
if (event.key === 'Tab' && !event.shiftKey) {
|
|
17424
|
-
event.preventDefault();
|
|
17425
|
-
setFocus('organization');
|
|
17426
|
-
}
|
|
17427
|
-
};
|
|
17428
17398
|
const collectPostalCode = getSafe(() => verificationService.programTheme.openOrgSearchEnabled)
|
|
17429
17399
|
&& getSafe(() => viewModel.organization.id) === 0
|
|
17430
17400
|
&& getSafe(() => viewModel.organization.name, '').length > 0;
|
|
@@ -17454,17 +17424,14 @@ const StepFirstResponderPersonalInfo = ({ intl, verificationService }) => {
|
|
|
17454
17424
|
React.createElement("div", { className: "sid-header__how-verifying-works sid-l-horz-center" },
|
|
17455
17425
|
React.createElement(HowDoesVerifyingWorkComponent, { verificationService: verificationService }),
|
|
17456
17426
|
React.createElement(RewardsRemainingComponent, { verificationService: verificationService })))),
|
|
17457
|
-
React.createElement(CountryComponentWrapper, { verificationService: verificationService, viewModel: viewModel
|
|
17427
|
+
React.createElement(CountryComponentWrapper, { verificationService: verificationService, viewModel: viewModel }),
|
|
17458
17428
|
React.createElement(FirstResponderStatusComponent, { value: {
|
|
17459
17429
|
value: viewModel.status,
|
|
17460
17430
|
label: getStatusLabel(intl, viewModel.status, FirstResponderStatusDefaultMessagesEnum),
|
|
17461
17431
|
}, isErrored: !!fieldValidationErrors.status, options: getAvailableFirstResponderStatuses(), onChange: (status) => {
|
|
17462
17432
|
updateFirstResponderViewModel('status', status ? status.value : '');
|
|
17463
17433
|
updateFieldValidationErrorsByFieldId('status', status ? status.value : '', verificationService);
|
|
17464
|
-
|
|
17465
|
-
setFocus('organization');
|
|
17466
|
-
}
|
|
17467
|
-
}, onKeyDown: event => handleFirstResponderStatusOnKeyDown(event) }),
|
|
17434
|
+
} }),
|
|
17468
17435
|
React.createElement(FirstResponderOrganizationComponent, { isErrored: !!fieldValidationErrors.organization, onChange: (choice) => {
|
|
17469
17436
|
updateViewModelOrganization(choice, verificationService);
|
|
17470
17437
|
updateFieldValidationErrorsByFieldId('organization', choice, verificationService);
|
|
@@ -17490,7 +17457,7 @@ const StepFirstResponderPersonalInfo = ({ intl, verificationService }) => {
|
|
|
17490
17457
|
? (React.createElement(PhoneNumberComponent, { isRequired: !!verificationService.programTheme.smsLoopEnabled, value: viewModel.phoneNumber, isErrored: !!fieldValidationErrors.phoneNumber, onChange: (newValue) => {
|
|
17491
17458
|
updateFirstResponderViewModel('phoneNumber', newValue);
|
|
17492
17459
|
updateFieldValidationErrorsByFieldId('phoneNumber', newValue, verificationService);
|
|
17493
|
-
} }))
|
|
17460
|
+
}, selectedCountryCode: viewModel.countryChoice && viewModel.countryChoice.value }))
|
|
17494
17461
|
: null,
|
|
17495
17462
|
collectPostalCode
|
|
17496
17463
|
? (React.createElement(PostalCodeComponent, { isErrored: !!fieldValidationErrors.postalCode, onChange: (newValue) => {
|
|
@@ -17513,13 +17480,11 @@ const StepFirstResponderPersonalInfo = ({ intl, verificationService }) => {
|
|
|
17513
17480
|
const StepFirstResponderPersonalInfoComponent = injectIntl(StepFirstResponderPersonalInfo);
|
|
17514
17481
|
|
|
17515
17482
|
const MedicalStatus = ({ value, isErrored, options, onChange, intl, placeholder = '', onKeyDown = undefined, }) => {
|
|
17516
|
-
const
|
|
17517
|
-
return (React.createElement("div", { className:
|
|
17483
|
+
const inputId = 'sid-medical-status';
|
|
17484
|
+
return (React.createElement("div", { className: `sid-field ${inputId}` },
|
|
17518
17485
|
React.createElement("div", { className: "sid-l-space-top-md" }),
|
|
17519
|
-
React.createElement("
|
|
17520
|
-
|
|
17521
|
-
React.createElement(FormattedHTMLMessage, { id: "status", defaultMessage: "Status" }))),
|
|
17522
|
-
React.createElement(InputSelectComponent, { fieldId: "status", inputId: id, isErrored: isErrored, options: options, onChange: (status) => onChange(status), onKeyDown: onKeyDown, value: value, placeholder: placeholder || intl.formatMessage({ id: 'statusPlaceholder', defaultMessage: 'Status*' }), isRequired: true }),
|
|
17486
|
+
React.createElement(FieldLabel, { text: React.createElement(FormattedHTMLMessage, { id: "status", defaultMessage: "Status" }), htmlForLabel: inputId, id: `${inputId}-label`, displayClasses: placeholder && 'sid-h-screen-reader-only' }),
|
|
17487
|
+
React.createElement(InputSelectComponent, { fieldId: "status", inputId: inputId, fieldLabelId: `${inputId}-label`, isErrored: isErrored, options: options, onChange: (status) => onChange(status), onKeyDown: onKeyDown, value: value, placeholder: placeholder || intl.formatMessage({ id: 'statusPlaceholder', defaultMessage: 'Status*' }), isRequired: true }),
|
|
17523
17488
|
isErrored ? (React.createElement("div", { className: "sid-field-error" },
|
|
17524
17489
|
React.createElement(FormattedHTMLMessage, { id: "errorId.invalidStatus", defaultMessage: "Invalid medical status" }))) : null));
|
|
17525
17490
|
};
|
|
@@ -17530,9 +17495,7 @@ const MedicalProfessionalOrganization = ({ onChange, value, isErrored, verificat
|
|
|
17530
17495
|
const id = 'sid-medical-professional-organization';
|
|
17531
17496
|
return (React.createElement("div", { className: "sid-field sid-medical-professional-organization-id" },
|
|
17532
17497
|
React.createElement("div", { className: "sid-l-space-top-md" }),
|
|
17533
|
-
React.createElement("
|
|
17534
|
-
React.createElement("div", { id: `${id}-label`, className: "sid-field__label sid-field__label--required sid-l-space-btm-sm" },
|
|
17535
|
-
React.createElement(FormattedHTMLMessage, { id: "organization", defaultMessage: "Organization" }))),
|
|
17498
|
+
React.createElement(FieldLabel, { text: React.createElement(FormattedHTMLMessage, { id: "organization", defaultMessage: "Organization" }), htmlForLabel: id, id: `${id}-label`, displayClasses: placeholder && 'sid-h-screen-reader-only' }),
|
|
17536
17499
|
React.createElement(TypeaheadComponent, { className: isErrored ? 'sid-text-input--error' : '', countryCode: getSafe(() => verificationService.viewModel.countryChoice.value), minimumSearchValueLength: getOptions().minimumOrganizationSearchLength, onChange: (choice) => onChange(choice), placeholder: placeholder || intl.formatMessage({ id: 'organizationPlaceholder', defaultMessage: 'Organization*' }), programId: programId, value: value, inputHtmlId: id, openOrgSearchEnabled: verificationService.programTheme.openOrgSearchEnabled, orgSearchUrl: verificationService.programTheme.config.orgSearchUrl, isRequired: true }),
|
|
17537
17500
|
isErrored ? (React.createElement("div", { className: "sid-field-error" },
|
|
17538
17501
|
React.createElement(FormattedHTMLMessage, { id: "errorId.invalidOrganization", defaultMessage: "You must select an organization from the list" }))) : null));
|
|
@@ -17572,12 +17535,6 @@ const StepMedicalProfessionalPersonalInfo = ({ intl, verificationService }) => {
|
|
|
17572
17535
|
});
|
|
17573
17536
|
return availableStatuses;
|
|
17574
17537
|
};
|
|
17575
|
-
const handleMedicalStatusOnKeyDown = (event) => {
|
|
17576
|
-
if (event.key === 'Tab' && !event.shiftKey) {
|
|
17577
|
-
event.preventDefault();
|
|
17578
|
-
setFocus('organization');
|
|
17579
|
-
}
|
|
17580
|
-
};
|
|
17581
17538
|
React.useEffect(() => {
|
|
17582
17539
|
(async () => {
|
|
17583
17540
|
if (viewModel.country && viewModel.status) {
|
|
@@ -17625,10 +17582,7 @@ const StepMedicalProfessionalPersonalInfo = ({ intl, verificationService }) => {
|
|
|
17625
17582
|
}, isErrored: !!fieldValidationErrors.status, options: getAvailableMedicalStatuses(), onChange: (status) => {
|
|
17626
17583
|
updateMedicalProfessionalViewModel('status', status ? status.value : '');
|
|
17627
17584
|
updateFieldValidationErrorsByFieldId('status', status ? status.value : '', verificationService);
|
|
17628
|
-
|
|
17629
|
-
setFocus('organization');
|
|
17630
|
-
}
|
|
17631
|
-
}, onKeyDown: event => handleMedicalStatusOnKeyDown(event) }),
|
|
17585
|
+
} }),
|
|
17632
17586
|
React.createElement(MedicalProfessionalOrganizationComponent, { isErrored: !!fieldValidationErrors.organization, onChange: (choice) => {
|
|
17633
17587
|
updateViewModelOrganization(choice, verificationService);
|
|
17634
17588
|
updateFieldValidationErrorsByFieldId('organization', choice, verificationService);
|
|
@@ -17658,7 +17612,7 @@ const StepMedicalProfessionalPersonalInfo = ({ intl, verificationService }) => {
|
|
|
17658
17612
|
? (React.createElement(PhoneNumberComponent, { isRequired: !!verificationService.programTheme.smsLoopEnabled, value: viewModel.phoneNumber, isErrored: !!fieldValidationErrors.phoneNumber, onChange: (newValue) => {
|
|
17659
17613
|
updateMedicalProfessionalViewModel('phoneNumber', newValue);
|
|
17660
17614
|
updateFieldValidationErrorsByFieldId('phoneNumber', newValue, verificationService);
|
|
17661
|
-
} }))
|
|
17615
|
+
}, selectedCountryCode: viewModel.countryChoice && viewModel.countryChoice.value }))
|
|
17662
17616
|
: null,
|
|
17663
17617
|
showMemberId && (React.createElement(MemberIdComponent, { value: viewModel.memberId, isErrored: !!fieldValidationErrors.memberId, isRequired: false, onChange: (newValue) => {
|
|
17664
17618
|
updateMedicalProfessionalViewModel('memberId', newValue);
|
|
@@ -17680,10 +17634,7 @@ const StepMedicalProfessionalPersonalInfoComponent = injectIntl(StepMedicalProfe
|
|
|
17680
17634
|
|
|
17681
17635
|
const State = ({ value, isErrored, onChange, intl, onKeyDown = undefined, placeholder = '', }) => (React.createElement("div", { className: "sid-field sid-state" },
|
|
17682
17636
|
React.createElement("div", { className: "sid-l-space-top-md" }),
|
|
17683
|
-
React.createElement("
|
|
17684
|
-
React.createElement("div", { className: `sid-field__label sid-l-space-btm-sm ${placeholder ? 'sid-h-screen-reader-only' : ''}` },
|
|
17685
|
-
React.createElement("div", { className: "sid-field__label sid-field__label--required" },
|
|
17686
|
-
React.createElement(FormattedHTMLMessage, { id: "state", defaultMessage: "State" })))),
|
|
17637
|
+
React.createElement(FieldLabel, { text: React.createElement(FormattedHTMLMessage, { id: "state", defaultMessage: "State" }), htmlForLabel: "sid-state", id: "sid-state-label", displayClasses: placeholder && 'sid-h-screen-reader-only' }),
|
|
17687
17638
|
React.createElement(InputTextComponent, { id: "state", isErrored: isErrored, onChange: e => onChange(e.target.value), onKeyDown: typeof onKeyDown === 'function' ? e => onKeyDown(e) : undefined, placeholder: placeholder || intl.formatMessage({ id: 'statePlaceholder', defaultMessage: 'State*' }), value: value }),
|
|
17688
17639
|
isErrored ? (React.createElement("div", { className: "sid-field-error" },
|
|
17689
17640
|
React.createElement(FormattedHTMLMessage, { id: "errorId.invalidState", defaultMessage: "Invalid state" }))) : null));
|
|
@@ -17693,9 +17644,7 @@ const Company = ({ onChange, value, isErrored, verificationService, intl, placeh
|
|
|
17693
17644
|
const { programId } = verificationService;
|
|
17694
17645
|
return (React.createElement("div", { className: "sid-field sid-company-id" },
|
|
17695
17646
|
React.createElement("div", { className: "sid-l-space-top-md" }),
|
|
17696
|
-
React.createElement("
|
|
17697
|
-
React.createElement("div", { className: `sid-field__label sid-field__label--required sid-l-space-btm-sm ${placeholder ? 'sid-h-screen-reader-only' : ''}` },
|
|
17698
|
-
React.createElement(FormattedHTMLMessage, { id: "company", defaultMessage: "Company" }))),
|
|
17647
|
+
React.createElement(FieldLabel, { text: React.createElement(FormattedHTMLMessage, { id: "company", defaultMessage: "Company" }), htmlForLabel: "sid-company", id: "sid-company-label", displayClasses: placeholder && 'sid-h-screen-reader-only' }),
|
|
17699
17648
|
React.createElement(TypeaheadComponent, { className: isErrored ? 'sid-text-input--error' : '', countryCode: getSafe(() => verificationService.viewModel.countryChoice.value), minimumSearchValueLength: getOptions().minimumOrganizationSearchLength, onChange: (choice) => onChange(choice), placeholder: placeholder || intl.formatMessage({ id: 'companyPlaceholder', defaultMessage: 'Company*' }), programId: programId, value: value, inputHtmlId: "sid-company", openOrgSearchEnabled: verificationService.programTheme.openOrgSearchEnabled, orgSearchUrl: verificationService.programTheme.config.orgSearchUrl }),
|
|
17700
17649
|
isErrored ? (React.createElement("div", { className: "sid-field-error" },
|
|
17701
17650
|
React.createElement(FormattedHTMLMessage, { id: "errorId.invalidOrganization", defaultMessage: "You must select an organization from the list" }))) : null));
|
|
@@ -17725,7 +17674,7 @@ const StepEmploymentPersonalInfo = ({ verificationService }) => {
|
|
|
17725
17674
|
"\u00A0",
|
|
17726
17675
|
React.createElement(HowDoesVerifyingWorkComponent, { verificationService: verificationService }),
|
|
17727
17676
|
React.createElement(RewardsRemainingComponent, { verificationService: verificationService }))),
|
|
17728
|
-
React.createElement(CountryComponentWrapper, { verificationService: verificationService, viewModel: viewModel,
|
|
17677
|
+
React.createElement(CountryComponentWrapper, { verificationService: verificationService, viewModel: viewModel, viewModelDraftDecorator: (draft, countryChoice) => {
|
|
17729
17678
|
const viewModel = draft;
|
|
17730
17679
|
viewModel.shouldCollectAddress = shouldCollectAddressFields(countryChoice, verificationService.programTheme.config.countries);
|
|
17731
17680
|
if (!viewModel.shouldCollectAddress) {
|
|
@@ -17781,7 +17730,7 @@ const StepEmploymentPersonalInfo = ({ verificationService }) => {
|
|
|
17781
17730
|
? (React.createElement(PhoneNumberComponent, { isRequired: !!verificationService.programTheme.smsLoopEnabled, value: viewModel.phoneNumber, isErrored: !!fieldValidationErrors.phoneNumber, onChange: (newValue) => {
|
|
17782
17731
|
updateEmploymentViewModel('phoneNumber', newValue);
|
|
17783
17732
|
updateFieldValidationErrorsByFieldId('phoneNumber', newValue, verificationService);
|
|
17784
|
-
} }))
|
|
17733
|
+
}, selectedCountryCode: viewModel.countryChoice && viewModel.countryChoice.value }))
|
|
17785
17734
|
: null,
|
|
17786
17735
|
React.createElement(MarketConsentWrapperComponent, { verificationService: verificationService, isErrored: !!fieldValidationErrors.marketConsentValue, onChange: (newValue) => {
|
|
17787
17736
|
updateEmploymentViewModel('metadata', { ...verificationService.viewModel.metadata, marketConsentValue: newValue });
|
|
@@ -17803,11 +17752,7 @@ const DriverLicenseNumber = ({ value, isErrored, onChange, explanation, intl, pl
|
|
|
17803
17752
|
: '');
|
|
17804
17753
|
return (React.createElement("div", { className: "sid-field sid-driver-license-number" },
|
|
17805
17754
|
React.createElement("div", { className: "sid-l-space-top-md" }),
|
|
17806
|
-
React.createElement("
|
|
17807
|
-
React.createElement("div", { className: `sid-field__label-with-explanation sid-l-space-btm-sm ${placeholder ? 'sid-h-screen-reader-only' : ''}` },
|
|
17808
|
-
React.createElement("div", { className: `sid-field__label${isRequired ? ' sid-field__label--required' : ''} ` },
|
|
17809
|
-
React.createElement(FormattedHTMLMessage, { id: "driverLicenseNumber", defaultMessage: "Driver license number" })),
|
|
17810
|
-
React.createElement("div", { className: "sid-field__label-explanation" }, explanation || getDefaultExplanation()))),
|
|
17755
|
+
React.createElement(FieldLabel, { text: React.createElement(FormattedHTMLMessage, { id: "driverLicenseNumber", defaultMessage: "Driver license number" }), htmlForLabel: "sid-driver-license-number", id: "sid-driver-license-number-label", displayClasses: `sid-field__label-with-explanation${placeholder && ' sid-h-screen-reader-only'}`, isRequired: isRequired }, explanation || getDefaultExplanation()),
|
|
17811
17756
|
React.createElement(InputTextComponent, { id: "driver-license-number", isErrored: isErrored, onChange: e => onChange(e.target.value), placeholder: placeholder
|
|
17812
17757
|
|| intl.formatMessage({
|
|
17813
17758
|
id: 'driverLicenseNumberPlaceholder',
|
|
@@ -17818,16 +17763,18 @@ const DriverLicenseNumber = ({ value, isErrored, onChange, explanation, intl, pl
|
|
|
17818
17763
|
};
|
|
17819
17764
|
const DriverLicenseNumberComponent = injectIntl(DriverLicenseNumber);
|
|
17820
17765
|
|
|
17821
|
-
const StateSelect = ({ value, isErrored, options, onChange, onKeyDown, intl, placeholder = '', label = '', isRequired = false, }) =>
|
|
17822
|
-
|
|
17823
|
-
React.createElement("
|
|
17824
|
-
React.createElement("div", { className:
|
|
17825
|
-
|
|
17826
|
-
|
|
17827
|
-
|
|
17828
|
-
|
|
17829
|
-
|
|
17830
|
-
React.createElement(
|
|
17766
|
+
const StateSelect = ({ value, isErrored, options, onChange, onKeyDown, intl, placeholder = '', label = '', isRequired = false, }) => {
|
|
17767
|
+
const inputId = 'sid-state';
|
|
17768
|
+
return (React.createElement("div", { className: `sid-field ${inputId}` },
|
|
17769
|
+
React.createElement("div", { className: "sid-l-space-top-md" }),
|
|
17770
|
+
React.createElement(FieldLabel, { text: label || React.createElement(FormattedHTMLMessage, { id: "state", defaultMessage: "State where you live" }), htmlForLabel: inputId, id: `${inputId}-label`, displayClasses: placeholder && 'sid-h-screen-reader-only', isRequired: isRequired }),
|
|
17771
|
+
React.createElement(InputSelectComponent, { fieldId: "state", inputId: inputId, fieldLabelId: `${inputId}-label`, isErrored: isErrored, options: options, onChange: (state) => onChange(state), onKeyDown: onKeyDown, placeholder: placeholder || intl.formatMessage({ id: 'statePlaceholder', defaultMessage: isRequired ? 'State*' : 'State' }), value: value ? {
|
|
17772
|
+
value: value.value,
|
|
17773
|
+
label: intl.formatMessage({ id: `states.${value.value}`, defaultMessage: value.label || value.value }),
|
|
17774
|
+
} : undefined }),
|
|
17775
|
+
isErrored ? (React.createElement("div", { className: "sid-field-error" },
|
|
17776
|
+
React.createElement(FormattedHTMLMessage, { id: "errorId.invalidState", defaultMessage: "Invalid state" }))) : null));
|
|
17777
|
+
};
|
|
17831
17778
|
const StateSelectComponent = injectIntl(StateSelect);
|
|
17832
17779
|
|
|
17833
17780
|
/**
|
|
@@ -17882,7 +17829,7 @@ const StepDriverLicensePersonalInfo = ({ intl, verificationService }) => {
|
|
|
17882
17829
|
? (React.createElement(PhoneNumberComponent, { isRequired: !!verificationService.programTheme.smsLoopEnabled, value: viewModel.phoneNumber, isErrored: !!fieldValidationErrors.phoneNumber, onChange: (newValue) => {
|
|
17883
17830
|
updateIdentityViewModel('phoneNumber', newValue);
|
|
17884
17831
|
updateFieldValidationErrorsByFieldId('phoneNumber', newValue, verificationService);
|
|
17885
|
-
} }))
|
|
17832
|
+
}, selectedCountryCode: viewModel.countryChoice && viewModel.countryChoice.value }))
|
|
17886
17833
|
: null,
|
|
17887
17834
|
React.createElement(StateSelectComponent, { isRequired: true, options: getAvailableStateChoices(verificationService.programTheme, intl), value: viewModel.state || undefined, isErrored: Boolean(fieldValidationErrors.state), onChange: async (stateChoice) => {
|
|
17888
17835
|
const stateValue = stateChoice ? stateChoice.value : undefined;
|
|
@@ -17959,7 +17906,7 @@ const StepGeneralIdentityPersonalInfo = ({ intl, verificationService }) => {
|
|
|
17959
17906
|
? (React.createElement(PhoneNumberComponent, { isRequired: !!verificationService.programTheme.smsLoopEnabled, value: viewModel.phoneNumber, isErrored: !!fieldValidationErrors.phoneNumber, onChange: (newValue) => {
|
|
17960
17907
|
updateIdentityViewModel('phoneNumber', newValue);
|
|
17961
17908
|
updateFieldValidationErrorsByFieldId('phoneNumber', newValue, verificationService);
|
|
17962
|
-
} }))
|
|
17909
|
+
}, selectedCountryCode: viewModel.countryChoice && viewModel.countryChoice.value }))
|
|
17963
17910
|
: null,
|
|
17964
17911
|
React.createElement(BirthDateComponent, { isErrored: !!fieldValidationErrors.birthDate, errorId: fieldValidationErrors.birthDate, onChange: (newValue) => {
|
|
17965
17912
|
updateIdentityViewModel('birthDate', newValue);
|
|
@@ -18049,7 +17996,7 @@ const StepHybridIdentityPersonalInfo = ({ intl, verificationService }) => {
|
|
|
18049
17996
|
? (React.createElement(PhoneNumberComponent, { isRequired: !!verificationService.programTheme.smsLoopEnabled, value: viewModel.phoneNumber, isErrored: !!fieldValidationErrors.phoneNumber, onChange: (newValue) => {
|
|
18050
17997
|
updateIdentityViewModel('phoneNumber', newValue);
|
|
18051
17998
|
updateFieldValidationErrorsByFieldId('phoneNumber', newValue, verificationService);
|
|
18052
|
-
} }))
|
|
17999
|
+
}, selectedCountryCode: viewModel.countryChoice && viewModel.countryChoice.value }))
|
|
18053
18000
|
: null,
|
|
18054
18001
|
React.createElement(BirthDateComponent, { isErrored: !!fieldValidationErrors.birthDate, errorId: fieldValidationErrors.birthDate, onChange: (newValue) => {
|
|
18055
18002
|
updateIdentityViewModel('birthDate', newValue);
|
|
@@ -18092,13 +18039,11 @@ const StepHybridIdentityPersonalInfo = ({ intl, verificationService }) => {
|
|
|
18092
18039
|
const StepHybridIdentityPersonalInfoComponent = injectIntl(StepHybridIdentityPersonalInfo);
|
|
18093
18040
|
|
|
18094
18041
|
const Status = ({ value, isErrored, options, onChange, intl, placeholder = '', onKeyDown = undefined, segmentId = '', }) => {
|
|
18095
|
-
const
|
|
18096
|
-
return (React.createElement("div", { className: `sid-field
|
|
18042
|
+
const inputId = `sid-${segmentId}-status`;
|
|
18043
|
+
return (React.createElement("div", { className: `sid-field ${inputId}` },
|
|
18097
18044
|
React.createElement("div", { className: "sid-l-space-top-md" }),
|
|
18098
|
-
React.createElement("
|
|
18099
|
-
|
|
18100
|
-
React.createElement(FormattedHTMLMessage, { id: "status", defaultMessage: "Status" }))),
|
|
18101
|
-
React.createElement(InputSelectComponent, { fieldId: "status", inputId: id, isErrored: isErrored, options: options, onChange: (status) => onChange(status), onKeyDown: onKeyDown, value: value, placeholder: placeholder || intl.formatMessage({ id: 'statusPlaceholder', defaultMessage: 'Status*' }), isRequired: true }),
|
|
18045
|
+
React.createElement(FieldLabel, { text: React.createElement(FormattedHTMLMessage, { id: "status", defaultMessage: "Status" }), htmlForLabel: inputId, id: `${inputId}-label`, displayClasses: placeholder && 'sid-h-screen-reader-only' }),
|
|
18046
|
+
React.createElement(InputSelectComponent, { fieldId: "status", inputId: inputId, fieldLabelId: `${inputId}-label`, isErrored: isErrored, options: options, onChange: (status) => onChange(status), onKeyDown: onKeyDown, value: value, placeholder: placeholder || intl.formatMessage({ id: 'statusPlaceholder', defaultMessage: 'Status*' }), isRequired: true }),
|
|
18102
18047
|
isErrored ? (React.createElement("div", { className: "sid-field-error" },
|
|
18103
18048
|
React.createElement(FormattedHTMLMessage, { id: "errorId.invalidStatus", defaultMessage: "Invalid status" }))) : null));
|
|
18104
18049
|
};
|
|
@@ -18108,9 +18053,7 @@ const LicensedProfessionalOrganization = ({ value, isErrored, onChange, verifica
|
|
|
18108
18053
|
const { programId } = verificationService;
|
|
18109
18054
|
return (React.createElement("div", { className: "sid-field sid-licensed-professional-id" },
|
|
18110
18055
|
React.createElement("div", { className: "sid-l-space-top-md" }),
|
|
18111
|
-
React.createElement("
|
|
18112
|
-
React.createElement("div", { className: "sid-field__label sid-field__label--required sid-l-space-btm-sm" },
|
|
18113
|
-
React.createElement(FormattedHTMLMessage, { id: "organization", defaultMessage: "Organization or Licensing Body" }))),
|
|
18056
|
+
React.createElement(FieldLabel, { text: React.createElement(FormattedHTMLMessage, { id: "organization", defaultMessage: "Organization" }), htmlForLabel: "sid-licensed-professional", id: "sid-licensed-professional-label", displayClasses: placeholder && 'sid-h-screen-reader-only' }),
|
|
18114
18057
|
React.createElement(TypeaheadComponent, { className: isErrored ? 'sid-text-input--error' : '', countryCode: getSafe(() => verificationService.viewModel.countryChoice.value), onChange: (choice) => onChange(choice), minimumSearchValueLength: getOptions().minimumOrganizationSearchLength, placeholder: placeholder || intl.formatMessage({ id: 'organizationNamePlaceholder', defaultMessage: 'Organization*' }), programId: programId, value: value, inputHtmlId: "sid-licensed-professional", openOrgSearchEnabled: verificationService.programTheme.openOrgSearchEnabled, orgSearchUrl: verificationService.programTheme.config.orgSearchUrl }),
|
|
18115
18058
|
isErrored ? (React.createElement("div", { className: "sid-field-error" },
|
|
18116
18059
|
React.createElement(FormattedHTMLMessage, { id: "errorId.invalidOrganization", defaultMessage: "You must select an organization from the list" }))) : null));
|
|
@@ -18153,12 +18096,6 @@ const StepLicensedProfessionalPersonalInfo = ({ intl, verificationService }) =>
|
|
|
18153
18096
|
}
|
|
18154
18097
|
return availableStatuses;
|
|
18155
18098
|
};
|
|
18156
|
-
const handleLicensedProfessionalStatusOnKeyDown = (event) => {
|
|
18157
|
-
if (event.key === 'Tab' && !event.shiftKey) {
|
|
18158
|
-
event.preventDefault();
|
|
18159
|
-
setFocus('organization');
|
|
18160
|
-
}
|
|
18161
|
-
};
|
|
18162
18099
|
return (React.createElement("div", { id: "sid-step-licensed-professional-personal-info", className: "sid-l-container" },
|
|
18163
18100
|
failedInstantMatch ? React.createElement("p", null, "Failied instant match")
|
|
18164
18101
|
: (React.createElement("div", { className: "sid-header" },
|
|
@@ -18178,10 +18115,7 @@ const StepLicensedProfessionalPersonalInfo = ({ intl, verificationService }) =>
|
|
|
18178
18115
|
const updatedStatuses = status ? [status.value] : [];
|
|
18179
18116
|
updateLicensedProfessionalViewModel('statuses', updatedStatuses);
|
|
18180
18117
|
updateFieldValidationErrorsByFieldId('statuses', status ? status.value : '', verificationService);
|
|
18181
|
-
|
|
18182
|
-
setFocus('organization');
|
|
18183
|
-
}
|
|
18184
|
-
}, onKeyDown: event => handleLicensedProfessionalStatusOnKeyDown(event) }),
|
|
18118
|
+
} }),
|
|
18185
18119
|
React.createElement(LicensedProfessionalOrganizationComponent, { isErrored: !!fieldValidationErrors.organization, onChange: (choice) => {
|
|
18186
18120
|
updateViewModelOrganization(choice, verificationService);
|
|
18187
18121
|
updateFieldValidationErrorsByFieldId('organization', choice, verificationService);
|
|
@@ -18280,7 +18214,7 @@ const StepMoverPersonalInfo = ({ verificationService }) => {
|
|
|
18280
18214
|
? (React.createElement(PhoneNumberComponent, { isRequired: !!verificationService.programTheme.smsLoopEnabled, value: viewModel.phoneNumber, isErrored: !!fieldValidationErrors.phoneNumber, onChange: (newValue) => {
|
|
18281
18215
|
updateMoverViewModel('phoneNumber', newValue);
|
|
18282
18216
|
updateFieldValidationErrorsByFieldId('phoneNumber', newValue, verificationService);
|
|
18283
|
-
} }))
|
|
18217
|
+
}, selectedCountryCode: viewModel.countryChoice && viewModel.countryChoice.value }))
|
|
18284
18218
|
: null,
|
|
18285
18219
|
React.createElement(MarketConsentWrapperComponent, { verificationService: verificationService, isErrored: !!fieldValidationErrors.marketConsentValue, onChange: (newValue) => {
|
|
18286
18220
|
updateMoverViewModel('metadata', { ...verificationService.viewModel.metadata, marketConsentValue: newValue });
|
|
@@ -18337,9 +18271,7 @@ const SocialSecurity = ({ value, isErrored, onChange, intl, placeholder = '', })
|
|
|
18337
18271
|
};
|
|
18338
18272
|
return (React.createElement("div", { className: "sid-field sid-ssn" },
|
|
18339
18273
|
React.createElement("div", { className: "sid-l-space-top-md" }),
|
|
18340
|
-
React.createElement("
|
|
18341
|
-
React.createElement("div", { className: `sid-field__label sid-field__label--required sid-l-space-btm-sm ${placeholder ? 'sid-h-screen-reader-only' : ''}` },
|
|
18342
|
-
React.createElement(FormattedHTMLMessage, { id: "ssn", defaultMessage: "Social Security Number" }))),
|
|
18274
|
+
React.createElement(FieldLabel, { text: React.createElement(FormattedHTMLMessage, { id: "ssn", defaultMessage: "Social Security Number" }), htmlForLabel: "sid-ssn", id: "sid-ssn-label", displayClasses: placeholder && 'sid-h-screen-reader-only' }),
|
|
18343
18275
|
React.createElement(InputTextComponent, { id: "ssn", refId: FieldIdEnum.socialSecurityNumber, className: "sid-ssn__input", isErrored: isErrored, required: true, placeholder: placeholder || intl.formatMessage({ id: 'ssnPlaceholder', defaultMessage: '000-00-0000' }), value: displaySSN(value), hidePlaceholder: false, onChange: e => changeSsn(unDisplaySSN(e.target.value)) }),
|
|
18344
18276
|
isErrored ? (React.createElement("div", { className: "sid-field-error" },
|
|
18345
18277
|
React.createElement(FormattedHTMLMessage, { id: "errorId.invalidSocialSecurityNumber", defaultMessage: "Invalid SSN" }))) : null));
|
|
@@ -18555,7 +18487,7 @@ const StepSuccess = ({ verificationService }) => {
|
|
|
18555
18487
|
React.createElement("div", { className: "sid-l-horz-center" }, hasLogo
|
|
18556
18488
|
? React.createElement(LogoComponent, { verificationService: verificationService })
|
|
18557
18489
|
: (React.createElement("img", { className: "sid-l-lead-image", alt: "design element", src: "https://s3.amazonaws.com/com.sheerid.resources/common/images/2018/icons/circle-check.svg" }))),
|
|
18558
|
-
React.createElement("div", { className: "sid-header__title sid-l-horz-center sid-l-space-top-md" },
|
|
18490
|
+
React.createElement("div", { className: "sid-header__title sid-l-horz-center sid-l-space-top-md", role: "alert", "aria-live": "polite" },
|
|
18559
18491
|
React.createElement(FormattedHTMLMessage, { id: "step.success.title", defaultMessage: "Success! You've been verified." })),
|
|
18560
18492
|
React.createElement("div", { className: "sid-header__subtitle sid-l-horz-center sid-l-two-thirds-width" },
|
|
18561
18493
|
React.createElement(FormattedHTMLMessage, { id: "step.success.subtitle", defaultMessage: `Here is your personal coupon code.
|