@sheerid/jslib 1.151.0 → 1.153.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 +4 -4
- package/es5/messages_ar.bundle.js +4 -4
- package/es5/messages_bg.bundle.js +4 -4
- package/es5/messages_cs.bundle.js +4 -4
- package/es5/messages_da.bundle.js +4 -4
- package/es5/messages_de.bundle.js +4 -4
- package/es5/messages_el.bundle.js +4 -4
- package/es5/messages_en-GB.bundle.js +4 -4
- package/es5/messages_es-ES.bundle.js +4 -4
- package/es5/messages_es.bundle.js +4 -4
- package/es5/messages_fi.bundle.js +4 -4
- package/es5/messages_fr-CA.bundle.js +4 -4
- package/es5/messages_fr.bundle.js +4 -4
- package/es5/messages_ga.bundle.js +4 -4
- package/es5/messages_hr.bundle.js +4 -4
- package/es5/messages_hu.bundle.js +4 -4
- package/es5/messages_id.bundle.js +4 -4
- package/es5/messages_it.bundle.js +4 -4
- package/es5/messages_iw.bundle.js +4 -4
- package/es5/messages_ja.bundle.js +4 -4
- package/es5/messages_ko.bundle.js +4 -4
- package/es5/messages_lo.bundle.js +4 -4
- package/es5/messages_lt.bundle.js +4 -4
- package/es5/messages_ms.bundle.js +4 -4
- package/es5/messages_nl.bundle.js +4 -4
- package/es5/messages_no.bundle.js +4 -4
- package/es5/messages_pl.bundle.js +4 -4
- package/es5/messages_pt-BR.bundle.js +4 -4
- package/es5/messages_pt.bundle.js +4 -4
- package/es5/messages_ru.bundle.js +4 -4
- package/es5/messages_sk.bundle.js +4 -4
- package/es5/messages_sl.bundle.js +4 -4
- package/es5/messages_sr.bundle.js +4 -4
- package/es5/messages_sv.bundle.js +4 -4
- package/es5/messages_th.bundle.js +4 -4
- package/es5/messages_tr.bundle.js +4 -4
- package/es5/messages_zh-HK.bundle.js +4 -4
- package/es5/messages_zh.bundle.js +4 -4
- package/manifest.json +43 -43
- package/package.json +1 -1
- package/sheerid-requestOrg.css +4 -4
- package/sheerid-requestOrg.js +5 -5
- package/sheerid-requestOrg.js.map +1 -1
- package/sheerid-utils.js +6 -6
- package/sheerid-utils.js.map +1 -1
- package/sheerid.css +4 -4
- package/sheerid.js +6 -6
- package/sheerid.js.map +1 -1
- package/sheerides6.js +43 -10
- package/sheerides6.js.map +1 -1
- package/src/components/StepMilitaryPersonalInfo/militaryStepHelpers.d.ts +0 -5
- package/src/es6.d.ts +2 -2
- package/src/lib/types/runtimeTypes.d.ts +4 -1
- package/src/lib/types/types.d.ts +4 -1
- package/src/lib/utils/stepComponentHelpers/stepComponentHelpers.d.ts +5 -0
- package/types-reference.zip +0 -0
package/sheerides6.js
CHANGED
|
@@ -36,6 +36,9 @@ const LICENSED_PROFESSIONAL_STATUS = [
|
|
|
36
36
|
"VETERINARIAN",
|
|
37
37
|
"CHILD_CARE_WORKER",
|
|
38
38
|
"LIBRARIAN",
|
|
39
|
+
"INTERIOR_DESIGNER",
|
|
40
|
+
"ARCHITECT",
|
|
41
|
+
"GENERAL_CONTRACTOR",
|
|
39
42
|
];
|
|
40
43
|
const RECENT_MOVER_STATUS = ["HOME_BUYER", "OTHER_MOVER"];
|
|
41
44
|
const LOW_INCOME_STATUS = ["SNAP_BENEFITS", "OTHER_GOVERNMENT_ASSISTANCE"];
|
|
@@ -654,6 +657,9 @@ var SubSegmentEnum;
|
|
|
654
657
|
SubSegmentEnum["OTHER_GOVERNMENT_ASSISTANCE"] = "otherGovernmentAssistance";
|
|
655
658
|
SubSegmentEnum["CHILD_CARE_WORKER"] = "childCareWorker";
|
|
656
659
|
SubSegmentEnum["LIBRARIAN"] = "librarian";
|
|
660
|
+
SubSegmentEnum["INTERIOR_DESIGNER"] = "interiorDesigner";
|
|
661
|
+
SubSegmentEnum["ARCHITECT"] = "architect";
|
|
662
|
+
SubSegmentEnum["GENERAL_CONTRACTOR"] = "generalContractor";
|
|
657
663
|
})(SubSegmentEnum || (SubSegmentEnum = {}));
|
|
658
664
|
Object.values(SubSegmentEnum); // For runtime checks
|
|
659
665
|
const MilitaryStatusDefaultMessagesEnum = {
|
|
@@ -5028,6 +5034,11 @@ const getStatusLabel = (intl, status, defaultMessages) => {
|
|
|
5028
5034
|
}
|
|
5029
5035
|
return intl.formatHTMLMessage({ id: status, defaultMessage: defaultMessages[status] });
|
|
5030
5036
|
};
|
|
5037
|
+
const orgToOption = (org) => ({
|
|
5038
|
+
value: org.id,
|
|
5039
|
+
label: org.name,
|
|
5040
|
+
country: org.country,
|
|
5041
|
+
});
|
|
5031
5042
|
// The jslib should not be the owner of this mapping,
|
|
5032
5043
|
// DATA-3164 exists to find another way.
|
|
5033
5044
|
const countryStatusAllowList = new Map([
|
|
@@ -14348,7 +14359,7 @@ const createFetchVerificationRequest = async ({ dispatch, verificationResponsePr
|
|
|
14348
14359
|
const messagesPromise = getMessages(locale, themeMessages, verificationResponse.segment);
|
|
14349
14360
|
const nextSegment = verificationResponse.segment;
|
|
14350
14361
|
let orgList = null;
|
|
14351
|
-
if (nextSegment === SegmentEnum.MILITARY) {
|
|
14362
|
+
if (nextSegment === SegmentEnum.MILITARY || nextSegment === SegmentEnum.LOW_INCOME) {
|
|
14352
14363
|
const orgListPromise = fetchProgramOrganizations(programTheme.config.orgSearchUrl, "");
|
|
14353
14364
|
orgList = await orgListPromise;
|
|
14354
14365
|
logger.info("orgList received: ", orgList);
|
|
@@ -18221,11 +18232,6 @@ const orgsInStatus = (status) => (org) => {
|
|
|
18221
18232
|
}
|
|
18222
18233
|
return !!org.name;
|
|
18223
18234
|
};
|
|
18224
|
-
const orgToOption = (org) => ({
|
|
18225
|
-
value: org.id,
|
|
18226
|
-
label: org.name,
|
|
18227
|
-
country: org.country,
|
|
18228
|
-
});
|
|
18229
18235
|
const updateMilitaryViewModel = (key, value, verificationService, availableStatuses) => {
|
|
18230
18236
|
const viewModel = verificationService.viewModel;
|
|
18231
18237
|
const nextState = fn(viewModel, (draft) => {
|
|
@@ -19216,6 +19222,9 @@ const defaultStatusMessages$1 = {
|
|
|
19216
19222
|
VETERINARIAN: "Veterinarian",
|
|
19217
19223
|
CHILD_CARE_WORKER: "Child Care Worker",
|
|
19218
19224
|
LIBRARIAN: "Librarian",
|
|
19225
|
+
INTERIOR_DESIGNER: "Interior Designer",
|
|
19226
|
+
ARCHITECT: "Architect",
|
|
19227
|
+
GENERAL_CONTRACTOR: "General Contractor",
|
|
19219
19228
|
};
|
|
19220
19229
|
const StepLicensedProfessionalPersonalInfo = ({ intl, verificationService, }) => {
|
|
19221
19230
|
const viewModel = verificationService.viewModel;
|
|
@@ -19399,15 +19408,39 @@ const StepMoverPersonalInfo = ({ verificationService }) => {
|
|
|
19399
19408
|
const StepMoverPersonalInfoComponent = injectIntl(StepMoverPersonalInfo);
|
|
19400
19409
|
|
|
19401
19410
|
const LowIncomeOrganization = ({ value, isErrored, onChange, verificationService, intl, placeholder = "", isRequired = false, }) => {
|
|
19402
|
-
const {
|
|
19411
|
+
const { viewModel, orgList } = verificationService;
|
|
19412
|
+
const { countryChoice } = viewModel;
|
|
19413
|
+
let options = [];
|
|
19414
|
+
const inputId = "sid-low-income";
|
|
19415
|
+
if (orgList) {
|
|
19416
|
+
let newOrganizations = orgList;
|
|
19417
|
+
if (countryChoice) {
|
|
19418
|
+
newOrganizations = orgList.filter((org) => org.country === countryChoice.value);
|
|
19419
|
+
}
|
|
19420
|
+
options = newOrganizations.map(orgToOption);
|
|
19421
|
+
}
|
|
19422
|
+
const handleStateChange = (selectedOrgOption, onChange) => {
|
|
19423
|
+
if (selectedOrgOption) {
|
|
19424
|
+
onChange({
|
|
19425
|
+
id: selectedOrgOption.value,
|
|
19426
|
+
name: selectedOrgOption.label,
|
|
19427
|
+
});
|
|
19428
|
+
}
|
|
19429
|
+
else {
|
|
19430
|
+
onChange({
|
|
19431
|
+
id: 0,
|
|
19432
|
+
name: "",
|
|
19433
|
+
});
|
|
19434
|
+
}
|
|
19435
|
+
};
|
|
19403
19436
|
return (React.createElement("div", { className: "sid-field sid-low-income-id" },
|
|
19404
19437
|
React.createElement("div", { className: "sid-l-space-top-md" }),
|
|
19405
19438
|
React.createElement(FieldLabel, { text: React.createElement(FormattedHTMLMessage, { id: "lowIncomeOrganization", defaultMessage: "Government Assistance Program" }), htmlForLabel: "sid-low-income", id: "sid-low-income-label", displayClasses: placeholder && "sid-h-screen-reader-only", isRequired: isRequired }),
|
|
19406
|
-
React.createElement(
|
|
19439
|
+
React.createElement(InputSelectComponent, { fieldId: "organization", inputId: inputId, fieldLabelId: `${inputId}-label`, isErrored: isErrored, options: SortByLabel(options), onChange: (organization) => handleStateChange(organization, onChange), value: options.find((option) => option.value === (value && value.value)), placeholder: placeholder ||
|
|
19407
19440
|
intl.formatHTMLMessage({
|
|
19408
19441
|
id: "lowIncomeOrganizationPlaceholder",
|
|
19409
19442
|
defaultMessage: "Government Assistance Program",
|
|
19410
|
-
}),
|
|
19443
|
+
}), isRequired: isRequired }),
|
|
19411
19444
|
isErrored ? (React.createElement("div", { className: "sid-field-error" },
|
|
19412
19445
|
React.createElement(FormattedHTMLMessage, { id: "errorId.invalidOrganization", defaultMessage: "You must select an organization from the list" }))) : null));
|
|
19413
19446
|
};
|
|
@@ -19494,7 +19527,7 @@ const StepLowIncomePersonalInfo = ({ intl, verificationService, }) => {
|
|
|
19494
19527
|
selectedStatus === "OTHER_GOVERNMENT_ASSISTANCE" && (React.createElement(LowIncomeOrganizationComponent, { isErrored: !!fieldValidationErrors.organization, onChange: (choice) => {
|
|
19495
19528
|
updateViewModelOrganization(choice, verificationService);
|
|
19496
19529
|
updateFieldValidationErrorsByFieldId("organization", choice, verificationService);
|
|
19497
|
-
}, value: verificationService.viewModel.organization, verificationService: verificationService, isRequired: true })),
|
|
19530
|
+
}, value: orgToOption(verificationService.viewModel.organization), verificationService: verificationService, isRequired: true })),
|
|
19498
19531
|
React.createElement("div", { className: "sid-names" },
|
|
19499
19532
|
React.createElement(FirstNameComponent, { value: viewModel.firstName, isErrored: !!fieldValidationErrors.firstName, onChange: (newValue) => {
|
|
19500
19533
|
updateLowIncomeViewModel("firstName", newValue);
|