@sheerid/jslib 1.72.0 → 1.73.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 +6 -6
- package/sheerid-requestOrg.js.map +1 -1
- package/sheerid-utils.js +5 -5
- package/sheerid-utils.js.map +1 -1
- package/sheerid.css +4 -4
- package/sheerid.js +11 -11
- package/sheerid.js.map +1 -1
- package/sheerides6.js +31 -9
- package/sheerides6.js.map +1 -1
- package/src/lib/ServerApi/TestingRouteOverrides.d.ts +1 -1
- package/src/lib/ServerApi/TestingRouteOverrides.test.d.ts +1 -0
- package/src/lib/types/runtimeTypes.d.ts +12 -1
- package/types-reference.zip +0 -0
package/sheerides6.js
CHANGED
|
@@ -494,11 +494,23 @@ const TryAgainSteps = Object.values(TryAgainStepsEnum); // For runtime checks
|
|
|
494
494
|
var MockStepsEnum;
|
|
495
495
|
(function (MockStepsEnum) {
|
|
496
496
|
MockStepsEnum["loading"] = "loading";
|
|
497
|
+
MockStepsEnum["collect"] = "collect";
|
|
497
498
|
})(MockStepsEnum || (MockStepsEnum = {}));
|
|
498
499
|
const MockSteps = [
|
|
499
500
|
...Object.values(VerificationStepsEnum),
|
|
500
501
|
...Object.values(MockStepsEnum),
|
|
501
502
|
];
|
|
503
|
+
var SegmentToStepMap;
|
|
504
|
+
(function (SegmentToStepMap) {
|
|
505
|
+
SegmentToStepMap["student"] = "collectStudentPersonalInfo";
|
|
506
|
+
SegmentToStepMap["military"] = "collectActiveMilitaryPersonalInfo";
|
|
507
|
+
SegmentToStepMap["teacher"] = "collectTeacherPersonalInfo";
|
|
508
|
+
SegmentToStepMap["firstResponder"] = "collectFirstResponderPersonalInfo";
|
|
509
|
+
SegmentToStepMap["senior"] = "collectSeniorPersonalInfo";
|
|
510
|
+
SegmentToStepMap["age"] = "collectAgePersonalInfo";
|
|
511
|
+
SegmentToStepMap["medical"] = "collectMedicalProfessionalPersonalInfo";
|
|
512
|
+
SegmentToStepMap["recentMover"] = "collectMoverPersonalInfo";
|
|
513
|
+
})(SegmentToStepMap || (SegmentToStepMap = {}));
|
|
502
514
|
var SegmentEnum;
|
|
503
515
|
(function (SegmentEnum) {
|
|
504
516
|
SegmentEnum["STUDENT"] = "student";
|
|
@@ -10421,15 +10433,21 @@ const allMockedResponses = {
|
|
|
10421
10433
|
};
|
|
10422
10434
|
|
|
10423
10435
|
// To load a specific step directly, visit e.g. localhost:1234/?step=success
|
|
10424
|
-
const getRouteOverride = () => {
|
|
10436
|
+
const getRouteOverride = (response = undefined) => {
|
|
10425
10437
|
try {
|
|
10426
10438
|
const parsed = new URLSearchParams(window.location.search);
|
|
10439
|
+
let step;
|
|
10440
|
+
const segment = getSafe(() => response.segment);
|
|
10427
10441
|
if (parsed.get(QUERY_STRING_STEP_OVERRIDE)) {
|
|
10428
|
-
|
|
10442
|
+
step = parsed.get(QUERY_STRING_STEP_OVERRIDE);
|
|
10429
10443
|
}
|
|
10430
|
-
if (getOptions().mockStep) {
|
|
10431
|
-
|
|
10444
|
+
else if (getOptions().mockStep) {
|
|
10445
|
+
step = getOptions().mockStep;
|
|
10432
10446
|
}
|
|
10447
|
+
if (step === MockStepsEnum.collect) {
|
|
10448
|
+
return SegmentToStepMap[segment];
|
|
10449
|
+
}
|
|
10450
|
+
return step;
|
|
10433
10451
|
}
|
|
10434
10452
|
catch (e) {
|
|
10435
10453
|
logger.error(e, 'getRouteOverride');
|
|
@@ -16905,9 +16923,7 @@ const BranchOfService = ({ autoFocus, onChange, value, isErrored, organizations,
|
|
|
16905
16923
|
React.createElement(FormattedHTMLMessage, { id: "branchOfService", defaultMessage: "Branch Of Service" }))),
|
|
16906
16924
|
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*' }) }),
|
|
16907
16925
|
isErrored ? (React.createElement("div", { className: "sid-field-error" },
|
|
16908
|
-
React.createElement(FormattedHTMLMessage, { id: "errorId.invalidOrganization", defaultMessage: "You must select an organization from the list" }))) : null
|
|
16909
|
-
status === 'MILITARY_FAMILY' ? (React.createElement("div", { className: "sid-field-notice" },
|
|
16910
|
-
React.createElement(FormattedHTMLMessage, { id: "militaryFamilyCardNote", defaultMessage: "Note: this offer is only available to military family members with a Dependent ID card." }))) : null));
|
|
16926
|
+
React.createElement(FormattedHTMLMessage, { id: "errorId.invalidOrganization", defaultMessage: "You must select an organization from the list" }))) : null));
|
|
16911
16927
|
};
|
|
16912
16928
|
const BranchOfServiceComponent = injectIntl(BranchOfService);
|
|
16913
16929
|
|
|
@@ -16920,6 +16936,7 @@ const StepActiveMilitaryPersonalInfo = ({ intl, verificationService }) => {
|
|
|
16920
16936
|
const { fieldValidationErrors } = verificationService;
|
|
16921
16937
|
const verificationResponse = verificationService.verificationResponse;
|
|
16922
16938
|
const failedInstantMatch = hasFailedInstantMatch(verificationResponse);
|
|
16939
|
+
const { status } = verificationService.viewModel;
|
|
16923
16940
|
const availableStatuses = getAvailableMilitaryStatuses(verificationService, intl);
|
|
16924
16941
|
const updateActiveMilitaryViewModel = (key, value) => {
|
|
16925
16942
|
verificationService.updateViewModel(updateMilitaryViewModel(key, value, verificationService, availableStatuses));
|
|
@@ -16964,6 +16981,8 @@ const StepActiveMilitaryPersonalInfo = ({ intl, verificationService }) => {
|
|
|
16964
16981
|
updateFieldValidationErrorsByFieldId('status', status ? status.value : '', verificationService);
|
|
16965
16982
|
} }))
|
|
16966
16983
|
: null,
|
|
16984
|
+
status === 'MILITARY_FAMILY' ? (React.createElement("div", { className: "sid-field-notice", "data-testid": "family-note" },
|
|
16985
|
+
React.createElement(FormattedHTMLMessage, { id: "militaryFamilyCardNote", defaultMessage: "Note: this offer is only available to military family members with a Dependent ID card." }))) : null,
|
|
16967
16986
|
React.createElement(BranchOfServiceComponent, { autoFocus: !!(viewModel.status && viewModel.organization.id === 0), isErrored: !!fieldValidationErrors.organization, onChange: (choice) => {
|
|
16968
16987
|
updateViewModelOrganization(choice, verificationService);
|
|
16969
16988
|
updateFieldValidationErrorsByFieldId('organization', choice, verificationService);
|
|
@@ -20317,6 +20336,7 @@ const StepDocUpload = ({ verificationService, intl }) => {
|
|
|
20317
20336
|
const viewModel = verificationService.viewModel;
|
|
20318
20337
|
const { fieldValidationErrors } = verificationService;
|
|
20319
20338
|
const hasLogo = !!getLogoUrl(programTheme);
|
|
20339
|
+
const subSegment = getSafe(() => verificationService.verificationResponse.subSegment);
|
|
20320
20340
|
const getFileForView = (file) => ({
|
|
20321
20341
|
name: file.name,
|
|
20322
20342
|
url: file.type.includes('image') ? URL.createObjectURL(file) : '',
|
|
@@ -20419,8 +20439,10 @@ const StepDocUpload = ({ verificationService, intl }) => {
|
|
|
20419
20439
|
React.createElement("div", { className: "sid-upload-info sid-l-space-top-md" },
|
|
20420
20440
|
React.createElement("div", { className: "sid-l-space-top-sm" },
|
|
20421
20441
|
React.createElement(UploadInfoComponent, { verificationService: verificationService })),
|
|
20422
|
-
|
|
20423
|
-
|
|
20442
|
+
subSegment === SubSegmentEnum.MILITARY_FAMILY
|
|
20443
|
+
? null
|
|
20444
|
+
: (React.createElement("div", { className: "sid-l-space-top-md" },
|
|
20445
|
+
React.createElement(AcceptableUploadsComponent, { verificationService: verificationService })))),
|
|
20424
20446
|
React.createElement("div", { className: "sid-upload-wrap sid-l-space-top-sm" },
|
|
20425
20447
|
React.createElement("div", { className: "sid-dropzone-wrap" },
|
|
20426
20448
|
conditionalErrorMsg,
|