@sheerid/jslib 1.111.0 → 1.112.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 +46 -46
- package/package.json +1 -1
- package/sheerid-requestOrg.css +4 -4
- package/sheerid-requestOrg.js +10 -10
- package/sheerid-requestOrg.js.map +1 -1
- package/sheerid-utils.js +8 -8
- package/sheerid-utils.js.map +1 -1
- package/sheerid.css +4 -4
- package/sheerid.js +12 -12
- package/sheerid.js.map +1 -1
- package/sheerides6.js +85 -87
- package/sheerides6.js.map +1 -1
- package/src/components/FormFields/ChangeLocale/ChangeLocaleComponent.d.ts +14 -2
- package/src/components/FormFields/Country/CountryComponentWrapper.d.ts +6 -4
- package/src/components/StepMemberPersonalInfo/StepMemberPersonalInfoComponent.d.ts +2 -9
- package/src/components/StepStudentPersonalInfo/StepStudentPersonalInfoComponent.d.ts +2 -9
- package/src/components/StepTeacherPersonalInfo/StepTeacherPersonalInfoComponent.d.ts +2 -10
- package/src/constants.d.ts +1 -0
- package/src/lib/installScript/iframe.d.ts +1 -0
- package/types-reference.zip +0 -0
package/sheerides6.js
CHANGED
|
@@ -1136,6 +1136,7 @@ const iframeClassNames = {
|
|
|
1136
1136
|
CLOSE_TEXT: "sid-modal__close-text",
|
|
1137
1137
|
CLOSE_ICON: "sid-modal__close-icon",
|
|
1138
1138
|
};
|
|
1139
|
+
const iframeTitle = "SheerID Verification Form";
|
|
1139
1140
|
const iframeConstants = {
|
|
1140
1141
|
CLASS_NAMES: iframeClassNames,
|
|
1141
1142
|
DEFAULT_MOBILE_THRESHOLD_WIDTH: 620,
|
|
@@ -9818,7 +9819,25 @@ const ChangeLocale = ({ value, options, onChange, intl, }) => {
|
|
|
9818
9819
|
} }),
|
|
9819
9820
|
React.createElement("div", { className: "sid-l-space-btm-sm" })));
|
|
9820
9821
|
};
|
|
9821
|
-
const ChangeLocaleComponent = injectIntl(ChangeLocale);
|
|
9822
|
+
const ChangeLocaleComponent = injectIntl(ChangeLocale);
|
|
9823
|
+
const ChangeLocaleV2 = ({ verificationService, intl }) => {
|
|
9824
|
+
const localeChoices = getAvailableLocaleChoices(verificationService.programTheme, intl);
|
|
9825
|
+
const defaultLocaleChoice = {
|
|
9826
|
+
value: "en-US",
|
|
9827
|
+
label: "English",
|
|
9828
|
+
};
|
|
9829
|
+
const updateLocale = (localeChoice) => {
|
|
9830
|
+
const nextState = fn(verificationService.viewModel, (draft) => {
|
|
9831
|
+
draft.localeChoice = localeChoice;
|
|
9832
|
+
});
|
|
9833
|
+
verificationService.updateLocale(nextState, verificationService.programTheme, verificationService.verificationResponse.segment);
|
|
9834
|
+
};
|
|
9835
|
+
if (localeChoices.length <= 1) {
|
|
9836
|
+
return null;
|
|
9837
|
+
}
|
|
9838
|
+
return (React.createElement(ChangeLocaleComponent, { options: localeChoices, value: verificationService.viewModel.localeChoice || defaultLocaleChoice, isErrored: false, onChange: (localeChoice) => updateLocale(localeChoice) }));
|
|
9839
|
+
};
|
|
9840
|
+
const ChangeLocaleV2Component = injectIntl(ChangeLocaleV2);
|
|
9822
9841
|
|
|
9823
9842
|
const LoadingSpinnerComponent = () => (React.createElement("div", { className: "sid-spinner" },
|
|
9824
9843
|
React.createElement("div", { className: "sid-spinner__frame" }),
|
|
@@ -10995,9 +11014,13 @@ const getRedirectUrlOverride = () => {
|
|
|
10995
11014
|
const getErrorStepMockResponseOverrides = (mockResponse) => {
|
|
10996
11015
|
const mockResponseClone = deepClone(mockResponse);
|
|
10997
11016
|
const errorMock = getErrorIdOverride();
|
|
11017
|
+
const redirectUrlMock = getRedirectUrlOverride();
|
|
10998
11018
|
if (errorMock) {
|
|
10999
11019
|
mockResponseClone.errorIds = [errorMock];
|
|
11000
11020
|
}
|
|
11021
|
+
if (redirectUrlMock) {
|
|
11022
|
+
mockResponseClone.redirectUrl = redirectUrlMock;
|
|
11023
|
+
}
|
|
11001
11024
|
return mockResponseClone;
|
|
11002
11025
|
};
|
|
11003
11026
|
const getSuccessStepMockResponseOverrides = (mockResponse) => {
|
|
@@ -14631,6 +14654,7 @@ const verificationServiceReducer = (state = getInitialState(), action) => {
|
|
|
14631
14654
|
case "RESET_STATE":
|
|
14632
14655
|
return {
|
|
14633
14656
|
...deepClone(getInitialState()),
|
|
14657
|
+
programId: state.programId,
|
|
14634
14658
|
};
|
|
14635
14659
|
case "FORCE_UPDATE":
|
|
14636
14660
|
return deepClone(state);
|
|
@@ -18494,14 +18518,20 @@ const HowDoesVerifyingWorkComponent = ({ verificationService, initialVisibility
|
|
|
18494
18518
|
React.createElement(FaqLinkComponent, { verificationService: verificationService })))) : null));
|
|
18495
18519
|
};
|
|
18496
18520
|
|
|
18497
|
-
const BaseCountryComponentWrapper = ({ verificationService,
|
|
18521
|
+
const BaseCountryComponentWrapper = ({ verificationService, viewModelDraftDecorator = undefined, intl, viewModel = undefined, nextFocusField = undefined, }) => {
|
|
18522
|
+
if (viewModel) {
|
|
18523
|
+
logger.warn("viewModel prop is deprecated, use verificationService.viewModel instead");
|
|
18524
|
+
}
|
|
18525
|
+
if (nextFocusField) {
|
|
18526
|
+
logger.warn("nextFocusField prop is deprecated");
|
|
18527
|
+
}
|
|
18498
18528
|
const countryChoices = getAvailableCountryChoices(verificationService.programTheme, intl);
|
|
18499
18529
|
const defaultCountryChoice = getDefaultCountryChoice(countryChoices);
|
|
18500
18530
|
const { fieldValidationErrors } = verificationService;
|
|
18501
18531
|
const hasMultipleCountries = countryChoices.length > 1;
|
|
18502
18532
|
const [firstRender, setFirstRender] = React.useState(true);
|
|
18503
18533
|
const updateCountryChoice = (countryChoice) => {
|
|
18504
|
-
const nextState = fn(viewModel, (draft) => {
|
|
18534
|
+
const nextState = fn(verificationService.viewModel, (draft) => {
|
|
18505
18535
|
draft.countryChoice = countryChoice || undefined;
|
|
18506
18536
|
// Adds backwards compatibility with Age and Employment programs
|
|
18507
18537
|
draft.country = countryChoice ? countryChoice.value : undefined;
|
|
@@ -18514,8 +18544,8 @@ const BaseCountryComponentWrapper = ({ verificationService, viewModel, intl, vie
|
|
|
18514
18544
|
React.useEffect(() => {
|
|
18515
18545
|
if (firstRender) {
|
|
18516
18546
|
setFirstRender(false);
|
|
18517
|
-
const countryChoice = viewModel.countryChoice
|
|
18518
|
-
? viewModel.countryChoice
|
|
18547
|
+
const countryChoice = verificationService.viewModel.countryChoice
|
|
18548
|
+
? verificationService.viewModel.countryChoice
|
|
18519
18549
|
: defaultCountryChoice;
|
|
18520
18550
|
updateCountryChoice(countryChoice);
|
|
18521
18551
|
}
|
|
@@ -18523,27 +18553,28 @@ const BaseCountryComponentWrapper = ({ verificationService, viewModel, intl, vie
|
|
|
18523
18553
|
React.useEffect(() => {
|
|
18524
18554
|
const includesUS = countryChoices.some((choice) => choice.value === "US");
|
|
18525
18555
|
if (!hasMultipleCountries && !includesUS) {
|
|
18526
|
-
const fieldsToSkip = viewModel.fieldsToSkipValidation
|
|
18527
|
-
? [...viewModel.fieldsToSkipValidation, "country"]
|
|
18556
|
+
const fieldsToSkip = verificationService.viewModel.fieldsToSkipValidation
|
|
18557
|
+
? [...verificationService.viewModel.fieldsToSkipValidation, "country"]
|
|
18528
18558
|
: ["country", "address1", "postalCode", "state", "city"];
|
|
18529
|
-
verificationService.updateViewModel(produceDraftViewModel(viewModel, "fieldsToSkipValidation", fieldsToSkip));
|
|
18559
|
+
verificationService.updateViewModel(produceDraftViewModel(verificationService.viewModel, "fieldsToSkipValidation", fieldsToSkip));
|
|
18530
18560
|
}
|
|
18531
18561
|
}, [hasMultipleCountries]);
|
|
18532
18562
|
React.useEffect(() => {
|
|
18533
18563
|
const updatedFieldValidationErrors = fn(verificationService.fieldValidationErrors, (draft) => {
|
|
18534
18564
|
if (draft.country) {
|
|
18535
|
-
draft.country = validateFieldById("country", viewModel.countryChoice, verificationService.formValidationOptions);
|
|
18565
|
+
draft.country = validateFieldById("country", verificationService.viewModel.countryChoice, verificationService.formValidationOptions);
|
|
18536
18566
|
}
|
|
18537
|
-
if ("postalCode" in viewModel &&
|
|
18538
|
-
|
|
18567
|
+
if ("postalCode" in verificationService.viewModel &&
|
|
18568
|
+
verificationService.viewModel.postalCode) {
|
|
18569
|
+
draft.postalCode = validateFieldById("postalCode", verificationService.viewModel.postalCode, verificationService.formValidationOptions);
|
|
18539
18570
|
}
|
|
18540
18571
|
});
|
|
18541
18572
|
updateFieldValidationErrors(updatedFieldValidationErrors, verificationService);
|
|
18542
|
-
}, [viewModel.countryChoice]);
|
|
18573
|
+
}, [verificationService.viewModel.countryChoice]);
|
|
18543
18574
|
if (!hasMultipleCountries) {
|
|
18544
18575
|
return null;
|
|
18545
18576
|
}
|
|
18546
|
-
return (React.createElement(CountryComponent, { isRequired: true, options: countryChoices, value: viewModel.countryChoice, isErrored: Boolean(fieldValidationErrors.country), onChange: async (countryChoice) => {
|
|
18577
|
+
return (React.createElement(CountryComponent, { isRequired: true, options: countryChoices, value: verificationService.viewModel.countryChoice, isErrored: Boolean(fieldValidationErrors.country), onChange: async (countryChoice) => {
|
|
18547
18578
|
const countryValue = countryChoice ? countryChoice.value : undefined;
|
|
18548
18579
|
updateCountryChoice(countryChoice);
|
|
18549
18580
|
updateFieldValidationErrorsByFieldId("country", countryValue, verificationService);
|
|
@@ -18625,14 +18656,9 @@ const ExtraMessage = ({ verificationService, suffix }) => verificationService.me
|
|
|
18625
18656
|
/**
|
|
18626
18657
|
* TODO - preamble
|
|
18627
18658
|
*/
|
|
18628
|
-
const StepStudentPersonalInfo = ({
|
|
18659
|
+
const StepStudentPersonalInfo = ({ verificationService, }) => {
|
|
18629
18660
|
const viewModel = verificationService.viewModel;
|
|
18630
18661
|
const { fieldValidationErrors } = verificationService;
|
|
18631
|
-
const localeChoices = getAvailableLocaleChoices(verificationService.programTheme, intl);
|
|
18632
|
-
const defaultLocaleChoice = {
|
|
18633
|
-
value: "en-US",
|
|
18634
|
-
label: "English",
|
|
18635
|
-
};
|
|
18636
18662
|
const verificationResponse = verificationService.verificationResponse;
|
|
18637
18663
|
const failedInstantMatch = hasFailedInstantMatch(verificationResponse);
|
|
18638
18664
|
const updateStudentViewModel = (key, value) => {
|
|
@@ -18641,12 +18667,6 @@ const StepStudentPersonalInfo = ({ intl, verificationService, }) => {
|
|
|
18641
18667
|
});
|
|
18642
18668
|
verificationService.updateViewModel(nextState);
|
|
18643
18669
|
};
|
|
18644
|
-
const updateLocale = (localeChoice) => {
|
|
18645
|
-
const nextState = fn(viewModel, (draft) => {
|
|
18646
|
-
draft.localeChoice = localeChoice;
|
|
18647
|
-
});
|
|
18648
|
-
verificationService.updateLocale(nextState, verificationService.programTheme, verificationService.verificationResponse.segment);
|
|
18649
|
-
};
|
|
18650
18670
|
return (React.createElement("div", { id: "sid-step-student-personal-info", className: "sid-l-container" },
|
|
18651
18671
|
failedInstantMatch ? (React.createElement("div", { className: "sid-header" },
|
|
18652
18672
|
React.createElement("div", { className: "sid-l-horz-center" },
|
|
@@ -18664,8 +18684,8 @@ const StepStudentPersonalInfo = ({ intl, verificationService, }) => {
|
|
|
18664
18684
|
"\u00A0",
|
|
18665
18685
|
React.createElement(HowDoesVerifyingWorkComponent, { verificationService: verificationService }),
|
|
18666
18686
|
React.createElement(RewardsRemainingComponent, { verificationService: verificationService })))),
|
|
18667
|
-
|
|
18668
|
-
React.createElement(CountryComponentWrapper, { verificationService: verificationService
|
|
18687
|
+
React.createElement(ChangeLocaleV2Component, { verificationService: verificationService }),
|
|
18688
|
+
React.createElement(CountryComponentWrapper, { verificationService: verificationService }),
|
|
18669
18689
|
React.createElement(CollegeNameComponent, { value: verificationService.viewModel.organization, verificationService: verificationService, isErrored: !!fieldValidationErrors.organization, isRequired: true, onChange: (choice) => {
|
|
18670
18690
|
updateViewModelOrganization(choice, verificationService);
|
|
18671
18691
|
updateFieldValidationErrorsByFieldId("organization", choice, verificationService);
|
|
@@ -18709,7 +18729,7 @@ const StepStudentPersonalInfo = ({ intl, verificationService, }) => {
|
|
|
18709
18729
|
React.createElement("span", { id: "verify-status-text" }, failedInstantMatch ? (React.createElement(FormattedHTMLMessage, { id: "tryAgain", defaultMessage: "Try Again" })) : (React.createElement(FormattedHTMLMessage, { id: "verifyMyStudentStatus", defaultMessage: "Verify My Student Status" })))))),
|
|
18710
18730
|
React.createElement(FormFooterComponent, { verificationService: verificationService })));
|
|
18711
18731
|
};
|
|
18712
|
-
const StepStudentPersonalInfoComponent =
|
|
18732
|
+
const StepStudentPersonalInfoComponent = StepStudentPersonalInfo;
|
|
18713
18733
|
|
|
18714
18734
|
const PostalCodeInput = ({ onChange, value, isValid, intl, placeholder = "", ariaLabelledBy, }) => (React.createElement(InputTextComponent, { id: "postal-code", isErrored: !isValid, onChange: (e) => onChange(e.target.value), pattern: "[a-zA-Z0-9 ]*", placeholder: placeholder ||
|
|
18715
18735
|
intl.formatHTMLMessage({ id: "postalCodePlaceholder", defaultMessage: "Postal Code" }), refId: "postalCode", value: value, required: true, "aria-labelledby": ariaLabelledBy }));
|
|
@@ -18739,7 +18759,7 @@ const StepSeniorPersonalInfo = ({ verificationService }) => {
|
|
|
18739
18759
|
});
|
|
18740
18760
|
verificationService.updateViewModel(nextState);
|
|
18741
18761
|
};
|
|
18742
|
-
return (React.createElement("div", { id: "sid-step-
|
|
18762
|
+
return (React.createElement("div", { id: "sid-step-senior-personal-info", className: "sid-l-container" },
|
|
18743
18763
|
failedInstantMatch ? (React.createElement("div", { className: "sid-header" },
|
|
18744
18764
|
React.createElement("div", { className: "sid-l-horz-center" },
|
|
18745
18765
|
React.createElement(LogoComponent, { verificationService: verificationService })),
|
|
@@ -18756,6 +18776,7 @@ const StepSeniorPersonalInfo = ({ verificationService }) => {
|
|
|
18756
18776
|
"\u00A0",
|
|
18757
18777
|
React.createElement(HowDoesVerifyingWorkComponent, { verificationService: verificationService }),
|
|
18758
18778
|
React.createElement(RewardsRemainingComponent, { verificationService: verificationService })))),
|
|
18779
|
+
React.createElement(ChangeLocaleV2Component, { verificationService: verificationService }),
|
|
18759
18780
|
React.createElement("div", { className: "sid-names" },
|
|
18760
18781
|
React.createElement(FirstNameComponent, { value: viewModel.firstName, isErrored: !!fieldValidationErrors.firstName, onChange: (newValue) => {
|
|
18761
18782
|
updateSeniorViewModel("firstName", newValue);
|
|
@@ -18905,7 +18926,8 @@ const StepAgePersonalInfo = ({ verificationService, intl }) => {
|
|
|
18905
18926
|
"\u00A0",
|
|
18906
18927
|
React.createElement(HowDoesVerifyingWorkComponent, { verificationService: verificationService }),
|
|
18907
18928
|
React.createElement(RewardsRemainingComponent, { verificationService: verificationService })))),
|
|
18908
|
-
React.createElement(
|
|
18929
|
+
React.createElement(ChangeLocaleV2Component, { verificationService: verificationService }),
|
|
18930
|
+
React.createElement(CountryComponentWrapper, { verificationService: verificationService, viewModelDraftDecorator: (draft, countryChoice) => {
|
|
18909
18931
|
const viewModelDraft = draft;
|
|
18910
18932
|
const country = countryChoice ? countryChoice.value : undefined;
|
|
18911
18933
|
if (!displayPhoneNumber(country, smsLoopEnabled)) {
|
|
@@ -18988,32 +19010,17 @@ const TeacherSchool = ({ value, isErrored, onChange, verificationService, intl,
|
|
|
18988
19010
|
};
|
|
18989
19011
|
const TeacherSchoolComponent = injectIntl(TeacherSchool);
|
|
18990
19012
|
|
|
18991
|
-
|
|
18992
|
-
* Step Teacher Personal Info Component
|
|
18993
|
-
* TODO - We need to import more from es6
|
|
18994
|
-
*/
|
|
18995
|
-
const StepTeacherPersonalInfo = ({ intl, verificationService, }) => {
|
|
19013
|
+
const StepTeacherPersonalInfo = ({ verificationService, }) => {
|
|
18996
19014
|
const viewModel = verificationService.viewModel;
|
|
18997
19015
|
const { fieldValidationErrors } = verificationService;
|
|
18998
19016
|
const verificationResponse = verificationService.verificationResponse;
|
|
18999
19017
|
const failedInstantMatch = hasFailedInstantMatch(verificationResponse);
|
|
19000
|
-
const localeChoices = getAvailableLocaleChoices(verificationService.programTheme, intl);
|
|
19001
|
-
const defaultLocaleChoice = {
|
|
19002
|
-
value: "en-US",
|
|
19003
|
-
label: "English",
|
|
19004
|
-
};
|
|
19005
19018
|
const updateTeacherViewModel = (key, value) => {
|
|
19006
19019
|
const nextState = fn(viewModel, (draft) => {
|
|
19007
19020
|
draft[key] = value;
|
|
19008
19021
|
});
|
|
19009
19022
|
verificationService.updateViewModel(nextState);
|
|
19010
19023
|
};
|
|
19011
|
-
const updateLocale = (localeChoice) => {
|
|
19012
|
-
const nextState = fn(viewModel, (draft) => {
|
|
19013
|
-
draft.localeChoice = localeChoice;
|
|
19014
|
-
});
|
|
19015
|
-
verificationService.updateLocale(nextState, verificationService.programTheme, verificationService.verificationResponse.segment);
|
|
19016
|
-
};
|
|
19017
19024
|
// Don't validate DOB if ID Check is not enabled
|
|
19018
19025
|
useEffect(() => {
|
|
19019
19026
|
if (!verificationService.programTheme.idCheckAddOnEnabled) {
|
|
@@ -19041,8 +19048,8 @@ const StepTeacherPersonalInfo = ({ intl, verificationService, }) => {
|
|
|
19041
19048
|
"\u00A0",
|
|
19042
19049
|
React.createElement(HowDoesVerifyingWorkComponent, { verificationService: verificationService }),
|
|
19043
19050
|
React.createElement(RewardsRemainingComponent, { verificationService: verificationService })))),
|
|
19044
|
-
|
|
19045
|
-
React.createElement(CountryComponentWrapper, { verificationService: verificationService
|
|
19051
|
+
React.createElement(ChangeLocaleV2Component, { verificationService: verificationService }),
|
|
19052
|
+
React.createElement(CountryComponentWrapper, { verificationService: verificationService }),
|
|
19046
19053
|
React.createElement(TeacherSchoolComponent, { value: verificationService.viewModel.organization, verificationService: verificationService, isErrored: !!fieldValidationErrors.organization, onChange: (choice) => {
|
|
19047
19054
|
updateViewModelOrganization(choice, verificationService);
|
|
19048
19055
|
updateFieldValidationErrorsByFieldId("organization", choice, verificationService);
|
|
@@ -19090,7 +19097,7 @@ const StepTeacherPersonalInfo = ({ intl, verificationService, }) => {
|
|
|
19090
19097
|
React.createElement("span", { id: "verify-status-text" }, failedInstantMatch ? (React.createElement(FormattedHTMLMessage, { id: "tryAgain", defaultMessage: "Try Again" })) : (React.createElement(FormattedHTMLMessage, { id: "verifyMyTeacherStatus", defaultMessage: "Verify My Teacher Status" })))))),
|
|
19091
19098
|
React.createElement(FormFooterComponent, { verificationService: verificationService })));
|
|
19092
19099
|
};
|
|
19093
|
-
const StepTeacherPersonalInfoComponent =
|
|
19100
|
+
const StepTeacherPersonalInfoComponent = StepTeacherPersonalInfo;
|
|
19094
19101
|
|
|
19095
19102
|
const MemberId = ({ value, isErrored, onChange, explanation, intl, placeholder = "", isRequired = false, label, }) => {
|
|
19096
19103
|
const getDefaultExplanation = () => !isRequired ? React.createElement(FormattedHTMLMessage, { id: "optional", defaultMessage: "Optional" }) : "";
|
|
@@ -19119,31 +19126,17 @@ const MembershipOrganization = ({ value, isErrored, onChange, verificationServic
|
|
|
19119
19126
|
};
|
|
19120
19127
|
const MembershipOrganizationComponent = injectIntl(MembershipOrganization);
|
|
19121
19128
|
|
|
19122
|
-
|
|
19123
|
-
* Step Member Personal Info Component
|
|
19124
|
-
*/
|
|
19125
|
-
const StepMemberPersonalInfo = ({ intl, verificationService, }) => {
|
|
19129
|
+
const StepMemberPersonalInfo = ({ verificationService }) => {
|
|
19126
19130
|
const viewModel = verificationService.viewModel;
|
|
19127
19131
|
const { fieldValidationErrors } = verificationService;
|
|
19128
19132
|
const verificationResponse = verificationService.verificationResponse;
|
|
19129
19133
|
const failedInstantMatch = hasFailedInstantMatch(verificationResponse);
|
|
19130
|
-
const localeChoices = getAvailableLocaleChoices(verificationService.programTheme, intl);
|
|
19131
|
-
const defaultLocaleChoice = {
|
|
19132
|
-
value: "en-US",
|
|
19133
|
-
label: "English",
|
|
19134
|
-
};
|
|
19135
19134
|
const updateMemberViewModel = (key, value) => {
|
|
19136
19135
|
const nextState = fn(viewModel, (draft) => {
|
|
19137
19136
|
draft[key] = value;
|
|
19138
19137
|
});
|
|
19139
19138
|
verificationService.updateViewModel(nextState);
|
|
19140
19139
|
};
|
|
19141
|
-
const updateLocale = (localeChoice) => {
|
|
19142
|
-
const nextState = fn(viewModel, (draft) => {
|
|
19143
|
-
draft.localeChoice = localeChoice;
|
|
19144
|
-
});
|
|
19145
|
-
verificationService.updateLocale(nextState, verificationService.programTheme, verificationService.verificationResponse.segment);
|
|
19146
|
-
};
|
|
19147
19140
|
return (React.createElement("div", { id: "sid-step-member-personal-info", className: "sid-l-container" },
|
|
19148
19141
|
failedInstantMatch ? (React.createElement("div", { className: "sid-header" },
|
|
19149
19142
|
React.createElement("div", { className: "sid-l-horz-center" },
|
|
@@ -19161,8 +19154,8 @@ const StepMemberPersonalInfo = ({ intl, verificationService, }) => {
|
|
|
19161
19154
|
"\u00A0",
|
|
19162
19155
|
React.createElement(HowDoesVerifyingWorkComponent, { verificationService: verificationService }),
|
|
19163
19156
|
React.createElement(RewardsRemainingComponent, { verificationService: verificationService })))),
|
|
19164
|
-
|
|
19165
|
-
React.createElement(CountryComponentWrapper, { verificationService: verificationService
|
|
19157
|
+
React.createElement(ChangeLocaleV2Component, { verificationService: verificationService }),
|
|
19158
|
+
React.createElement(CountryComponentWrapper, { verificationService: verificationService }),
|
|
19166
19159
|
React.createElement(MembershipOrganizationComponent, { value: verificationService.viewModel.organization, verificationService: verificationService, isErrored: !!fieldValidationErrors.organization, onChange: (choice) => {
|
|
19167
19160
|
updateViewModelOrganization(choice, verificationService);
|
|
19168
19161
|
updateFieldValidationErrorsByFieldId("organization", choice, verificationService);
|
|
@@ -19210,7 +19203,7 @@ const StepMemberPersonalInfo = ({ intl, verificationService, }) => {
|
|
|
19210
19203
|
React.createElement("span", { id: "verify-status-text" }, failedInstantMatch ? (React.createElement(FormattedHTMLMessage, { id: "tryAgain", defaultMessage: "Try Again" })) : (React.createElement(FormattedHTMLMessage, { id: "verifyMyMembershipStatus", defaultMessage: "Verify My Membership Status" })))))),
|
|
19211
19204
|
React.createElement(FormFooterComponent, { verificationService: verificationService })));
|
|
19212
19205
|
};
|
|
19213
|
-
const StepMemberPersonalInfoComponent =
|
|
19206
|
+
const StepMemberPersonalInfoComponent = StepMemberPersonalInfo;
|
|
19214
19207
|
|
|
19215
19208
|
const compareLabel = (a, b) => {
|
|
19216
19209
|
let sortValue;
|
|
@@ -19353,7 +19346,8 @@ const StepActiveMilitaryPersonalInfo = ({ intl, verificationService, }) => {
|
|
|
19353
19346
|
React.createElement("div", { className: "sid-header__how-verifying-works sid-l-horz-center" },
|
|
19354
19347
|
React.createElement(HowDoesVerifyingWorkComponent, { verificationService: verificationService }),
|
|
19355
19348
|
React.createElement(RewardsRemainingComponent, { verificationService: verificationService })))),
|
|
19356
|
-
React.createElement(
|
|
19349
|
+
React.createElement(ChangeLocaleV2Component, { verificationService: verificationService }),
|
|
19350
|
+
React.createElement(CountryComponentWrapper, { verificationService: verificationService }),
|
|
19357
19351
|
availableStatuses ? (React.createElement(MilitaryStatusComponent, { value: {
|
|
19358
19352
|
value: viewModel.status,
|
|
19359
19353
|
label: getStatusLabel(intl, viewModel.status, MilitaryStatusDefaultMessagesEnum),
|
|
@@ -19563,7 +19557,8 @@ const StepInactiveMilitaryPersonalInfo = ({ intl, verificationService, }) => {
|
|
|
19563
19557
|
"\u00A0",
|
|
19564
19558
|
React.createElement(HowDoesVerifyingWorkComponent, { verificationService: verificationService }),
|
|
19565
19559
|
React.createElement(RewardsRemainingComponent, { verificationService: verificationService })))),
|
|
19566
|
-
React.createElement(
|
|
19560
|
+
React.createElement(ChangeLocaleV2Component, { verificationService: verificationService }),
|
|
19561
|
+
React.createElement(CountryComponentWrapper, { verificationService: verificationService }),
|
|
19567
19562
|
availableStatuses ? (React.createElement(MilitaryStatusComponent, { value: {
|
|
19568
19563
|
value: viewModel.status,
|
|
19569
19564
|
label: getStatusLabel(intl, viewModel.status, MilitaryStatusDefaultMessagesEnum),
|
|
@@ -19702,7 +19697,8 @@ const StepFirstResponderPersonalInfo = ({ intl, verificationService, }) => {
|
|
|
19702
19697
|
React.createElement("div", { className: "sid-header__how-verifying-works sid-l-horz-center" },
|
|
19703
19698
|
React.createElement(HowDoesVerifyingWorkComponent, { verificationService: verificationService }),
|
|
19704
19699
|
React.createElement(RewardsRemainingComponent, { verificationService: verificationService })))),
|
|
19705
|
-
React.createElement(
|
|
19700
|
+
React.createElement(ChangeLocaleV2Component, { verificationService: verificationService }),
|
|
19701
|
+
React.createElement(CountryComponentWrapper, { verificationService: verificationService }),
|
|
19706
19702
|
React.createElement(FirstResponderStatusComponent, { value: {
|
|
19707
19703
|
value: viewModel.status,
|
|
19708
19704
|
label: getStatusLabel(intl, viewModel.status, FirstResponderStatusDefaultMessagesEnum),
|
|
@@ -19857,7 +19853,8 @@ const StepMedicalProfessionalPersonalInfo = ({ intl, verificationService, }) =>
|
|
|
19857
19853
|
React.createElement("div", { className: "sid-header__how-verifying-works sid-l-horz-center" },
|
|
19858
19854
|
React.createElement(HowDoesVerifyingWorkComponent, { verificationService: verificationService }),
|
|
19859
19855
|
React.createElement(RewardsRemainingComponent, { verificationService: verificationService })))),
|
|
19860
|
-
React.createElement(
|
|
19856
|
+
React.createElement(ChangeLocaleV2Component, { verificationService: verificationService }),
|
|
19857
|
+
React.createElement(CountryComponentWrapper, { verificationService: verificationService }),
|
|
19861
19858
|
React.createElement(MedicalStatusComponent, { value: {
|
|
19862
19859
|
value: viewModel.status,
|
|
19863
19860
|
label: getStatusLabel(intl, viewModel.status, MedicalProfessionalStatusDefaultMessagesEnum),
|
|
@@ -19981,7 +19978,8 @@ const StepEmploymentPersonalInfo = ({ intl, verificationService, }) => {
|
|
|
19981
19978
|
"\u00A0",
|
|
19982
19979
|
React.createElement(HowDoesVerifyingWorkComponent, { verificationService: verificationService }),
|
|
19983
19980
|
React.createElement(RewardsRemainingComponent, { verificationService: verificationService }))),
|
|
19984
|
-
React.createElement(
|
|
19981
|
+
React.createElement(ChangeLocaleV2Component, { verificationService: verificationService }),
|
|
19982
|
+
React.createElement(CountryComponentWrapper, { verificationService: verificationService, viewModelDraftDecorator: (draft, countryChoice) => {
|
|
19985
19983
|
const viewModel = draft;
|
|
19986
19984
|
viewModel.shouldCollectAddress = shouldCollectAddressFields(countryChoice, verificationService.programTheme.config.countries);
|
|
19987
19985
|
if (!viewModel.shouldCollectAddress) {
|
|
@@ -20104,6 +20102,7 @@ const StepDriverLicensePersonalInfo = ({ intl, verificationService, }) => {
|
|
|
20104
20102
|
React.createElement("div", { className: "sid-header__how-verifying-works sid-l-horz-center" },
|
|
20105
20103
|
React.createElement(HowDoesVerifyingWorkComponent, { verificationService: verificationService }),
|
|
20106
20104
|
React.createElement(RewardsRemainingComponent, { verificationService: verificationService })))),
|
|
20105
|
+
React.createElement(ChangeLocaleV2Component, { verificationService: verificationService }),
|
|
20107
20106
|
React.createElement("div", { className: "sid-names" },
|
|
20108
20107
|
React.createElement(FirstNameComponent, { value: viewModel.firstName, isErrored: !!fieldValidationErrors.firstName, onChange: (newValue) => {
|
|
20109
20108
|
updateIdentityViewModel("firstName", newValue);
|
|
@@ -20183,6 +20182,7 @@ const StepGeneralIdentityPersonalInfo = ({ intl, verificationService, }) => {
|
|
|
20183
20182
|
React.createElement("div", { className: "sid-header__how-verifying-works sid-l-horz-center" },
|
|
20184
20183
|
React.createElement(HowDoesVerifyingWorkComponent, { verificationService: verificationService }),
|
|
20185
20184
|
React.createElement(RewardsRemainingComponent, { verificationService: verificationService })))),
|
|
20185
|
+
React.createElement(ChangeLocaleV2Component, { verificationService: verificationService }),
|
|
20186
20186
|
React.createElement("div", { className: "sid-names" },
|
|
20187
20187
|
React.createElement(FirstNameComponent, { value: viewModel.firstName, isErrored: !!fieldValidationErrors.firstName, onChange: (newValue) => {
|
|
20188
20188
|
updateIdentityViewModel("firstName", newValue);
|
|
@@ -20275,6 +20275,7 @@ const StepHybridIdentityPersonalInfo = ({ intl, verificationService, }) => {
|
|
|
20275
20275
|
React.createElement("div", { className: "sid-header__how-verifying-works sid-l-horz-center" },
|
|
20276
20276
|
React.createElement(HowDoesVerifyingWorkComponent, { verificationService: verificationService }),
|
|
20277
20277
|
React.createElement(RewardsRemainingComponent, { verificationService: verificationService })))),
|
|
20278
|
+
React.createElement(ChangeLocaleV2Component, { verificationService: verificationService }),
|
|
20278
20279
|
React.createElement("div", { className: "sid-names" },
|
|
20279
20280
|
React.createElement(FirstNameComponent, { value: viewModel.firstName, isErrored: !!fieldValidationErrors.firstName, onChange: (newValue) => {
|
|
20280
20281
|
updateIdentityViewModel("firstName", newValue);
|
|
@@ -20403,7 +20404,9 @@ const StepLicensedProfessionalPersonalInfo = ({ intl, verificationService, }) =>
|
|
|
20403
20404
|
return availableStatuses;
|
|
20404
20405
|
};
|
|
20405
20406
|
return (React.createElement("div", { id: "sid-step-licensed-professional-personal-info", className: "sid-l-container" },
|
|
20406
|
-
failedInstantMatch ? (
|
|
20407
|
+
failedInstantMatch ? (
|
|
20408
|
+
// TODO localize this message
|
|
20409
|
+
React.createElement("p", null, "Failied instant match")) : (React.createElement("div", { className: "sid-header" },
|
|
20407
20410
|
React.createElement("div", { className: "sid-l-horz-center" },
|
|
20408
20411
|
React.createElement(LogoComponent, { verificationService: verificationService })),
|
|
20409
20412
|
React.createElement("div", { className: "sid-header__title sid-l-horz-center" },
|
|
@@ -20413,6 +20416,8 @@ const StepLicensedProfessionalPersonalInfo = ({ intl, verificationService, }) =>
|
|
|
20413
20416
|
React.createElement("div", { className: "sid-header__how-verifying-works sid-l-horz-center" },
|
|
20414
20417
|
React.createElement(HowDoesVerifyingWorkComponent, { verificationService: verificationService }),
|
|
20415
20418
|
React.createElement(RewardsRemainingComponent, { verificationService: verificationService })))),
|
|
20419
|
+
React.createElement(ChangeLocaleV2Component, { verificationService: verificationService }),
|
|
20420
|
+
React.createElement(CountryComponentWrapper, { verificationService: verificationService }),
|
|
20416
20421
|
React.createElement(StatusComponent, { segmentId: SEGMENT_ID$1, value: {
|
|
20417
20422
|
value: viewModel.statuses ? viewModel.statuses[0] : "",
|
|
20418
20423
|
label: viewModel.statuses ? getStatusLabel(viewModel.statuses[0]) : "",
|
|
@@ -20502,6 +20507,7 @@ const StepMoverPersonalInfo = ({ verificationService }) => {
|
|
|
20502
20507
|
React.createElement("br", null),
|
|
20503
20508
|
React.createElement(HowDoesVerifyingWorkComponent, { verificationService: verificationService }),
|
|
20504
20509
|
React.createElement(RewardsRemainingComponent, { verificationService: verificationService })))),
|
|
20510
|
+
React.createElement(ChangeLocaleV2Component, { verificationService: verificationService }),
|
|
20505
20511
|
React.createElement("div", { className: "sid-names" },
|
|
20506
20512
|
React.createElement(FirstNameComponent, { value: viewModel.firstName, isErrored: !!fieldValidationErrors.firstName, onChange: (newValue) => {
|
|
20507
20513
|
updateMoverViewModel("firstName", newValue);
|
|
@@ -20576,11 +20582,6 @@ const StepLowIncomePersonalInfo = ({ intl, verificationService, }) => {
|
|
|
20576
20582
|
const { fieldValidationErrors } = verificationService;
|
|
20577
20583
|
const verificationResponse = verificationService.verificationResponse;
|
|
20578
20584
|
const failedInstantMatch = hasFailedInstantMatch(verificationResponse);
|
|
20579
|
-
const localeChoices = getAvailableLocaleChoices(verificationService.programTheme, intl);
|
|
20580
|
-
const defaultLocaleChoice = {
|
|
20581
|
-
value: "en-US",
|
|
20582
|
-
label: "English",
|
|
20583
|
-
};
|
|
20584
20585
|
const selectedStatus = viewModel.statuses[0] ? viewModel.statuses[0] : undefined;
|
|
20585
20586
|
const isSelectedStatusSnapBenefits = selectedStatus === "SNAP_BENEFITS";
|
|
20586
20587
|
const updateLowIncomeViewModel = (key, value) => {
|
|
@@ -20608,12 +20609,6 @@ const StepLowIncomePersonalInfo = ({ intl, verificationService, }) => {
|
|
|
20608
20609
|
}
|
|
20609
20610
|
return availableStatuses;
|
|
20610
20611
|
};
|
|
20611
|
-
const updateLocale = (localeChoice) => {
|
|
20612
|
-
const nextState = fn(viewModel, (draft) => {
|
|
20613
|
-
draft.localeChoice = localeChoice;
|
|
20614
|
-
});
|
|
20615
|
-
verificationService.updateLocale(nextState, verificationService.programTheme, verificationService.verificationResponse.segment);
|
|
20616
|
-
};
|
|
20617
20612
|
React.useEffect(() => {
|
|
20618
20613
|
if (isSelectedStatusSnapBenefits) {
|
|
20619
20614
|
const updatedViewModel = { fieldsToSkipValidation: ["organization"] };
|
|
@@ -20637,8 +20632,8 @@ const StepLowIncomePersonalInfo = ({ intl, verificationService, }) => {
|
|
|
20637
20632
|
"\u00A0",
|
|
20638
20633
|
React.createElement(HowDoesVerifyingWorkComponent, { verificationService: verificationService }),
|
|
20639
20634
|
React.createElement(RewardsRemainingComponent, { verificationService: verificationService })))),
|
|
20640
|
-
|
|
20641
|
-
React.createElement(CountryComponentWrapper, { verificationService: verificationService
|
|
20635
|
+
React.createElement(ChangeLocaleV2Component, { verificationService: verificationService }),
|
|
20636
|
+
React.createElement(CountryComponentWrapper, { verificationService: verificationService }),
|
|
20642
20637
|
React.createElement(StatusComponent, { segmentId: SEGMENT_ID, value: {
|
|
20643
20638
|
value: viewModel.statuses ? viewModel.statuses[0] : "",
|
|
20644
20639
|
label: viewModel.statuses ? getStatusLabel(viewModel.statuses[0]) : "",
|
|
@@ -20784,6 +20779,7 @@ const Step = ({ verificationService }) => {
|
|
|
20784
20779
|
React.createElement(LogoComponent, { verificationService: verificationService })),
|
|
20785
20780
|
React.createElement("div", { className: "sid-header__title sid-l-horz-center" },
|
|
20786
20781
|
React.createElement(FormattedHTMLMessage, { id: "step.collectSocialSecurityNumber.title", defaultMessage: "Enter your social security number" })),
|
|
20782
|
+
React.createElement(ChangeLocaleV2Component, { verificationService: verificationService }),
|
|
20787
20783
|
React.createElement("div", { className: "sid-ssn-wrapper" },
|
|
20788
20784
|
React.createElement(SocialSecurityNumber, { value: viewModel.socialSecurityNumber, onChange: (value) => {
|
|
20789
20785
|
updateSSNViewModel("socialSecurityNumber", value);
|
|
@@ -23530,6 +23526,7 @@ class Iframe {
|
|
|
23530
23526
|
if (Iframe.isValidHttpUrl(url)) {
|
|
23531
23527
|
const options = {
|
|
23532
23528
|
className: iframeConstants.CLASS_NAMES.INLINE_IFRAME_CONTENT,
|
|
23529
|
+
title: iframeTitle,
|
|
23533
23530
|
};
|
|
23534
23531
|
this.containerElement = containerElement;
|
|
23535
23532
|
this.verificationUrl = new URL(getVerificationUrl(url));
|
|
@@ -23556,7 +23553,7 @@ class Iframe {
|
|
|
23556
23553
|
createIframe(options) {
|
|
23557
23554
|
this.iframe = document.createElement("iframe");
|
|
23558
23555
|
this.iframe.classList.add(options.className);
|
|
23559
|
-
this.iframe.title =
|
|
23556
|
+
this.iframe.title = options.title;
|
|
23560
23557
|
let mark = "?";
|
|
23561
23558
|
if (this.verificationUrl.search) {
|
|
23562
23559
|
mark = "&";
|
|
@@ -23681,6 +23678,7 @@ class Modal {
|
|
|
23681
23678
|
this.iframeInstance = new Iframe(wrapper, this.verificationUrl);
|
|
23682
23679
|
const options = {
|
|
23683
23680
|
className: iframeConstants.CLASS_NAMES.MODAL_IFRAME,
|
|
23681
|
+
title: iframeTitle,
|
|
23684
23682
|
};
|
|
23685
23683
|
this.iframeInstance.createIframe(options);
|
|
23686
23684
|
wrapper.appendChild(this.iframeInstance.iframe);
|