@sheerid/jslib 1.130.0 → 1.131.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 +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 +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 +7 -7
- package/sheerid-utils.js.map +1 -1
- package/sheerid.css +4 -4
- package/sheerid.js +13 -13
- package/sheerid.js.map +1 -1
- package/sheerides6.js +25 -3
- package/sheerides6.js.map +1 -1
- package/src/lib/types/runtimeTypes.d.ts +2 -1
- package/src/lib/types/types.d.ts +13 -3
- package/types-reference.zip +0 -0
package/sheerides6.js
CHANGED
|
@@ -526,6 +526,7 @@ var VerificationStepsEnum;
|
|
|
526
526
|
VerificationStepsEnum["consolation"] = "consolation";
|
|
527
527
|
VerificationStepsEnum["override"] = "override";
|
|
528
528
|
VerificationStepsEnum["cancelDocUpload"] = "cancelDocUpload";
|
|
529
|
+
VerificationStepsEnum["missingRequiredMetadata"] = "missingRequiredMetadata";
|
|
529
530
|
})(VerificationStepsEnum || (VerificationStepsEnum = {}));
|
|
530
531
|
const VerificationSteps = Object.values(VerificationStepsEnum); // For runtime checks
|
|
531
532
|
// This depends on all collect steps starting with the string 'collect' if that
|
|
@@ -1382,6 +1383,10 @@ const setOptions = (newOptions) => {
|
|
|
1382
1383
|
options$1.customFormFields = newOptions.customFormFields;
|
|
1383
1384
|
logger.info('option "customFormFields" set to', options$1.customFormFields);
|
|
1384
1385
|
}
|
|
1386
|
+
if (newOptions.hasOwnProperty("customMetadata")) {
|
|
1387
|
+
options$1.customMetadata = newOptions.customMetadata;
|
|
1388
|
+
logger.info('option "customMetadata" set to', options$1.customMetadata);
|
|
1389
|
+
}
|
|
1385
1390
|
};
|
|
1386
1391
|
|
|
1387
1392
|
class ResponseTimeLogger {
|
|
@@ -3236,19 +3241,20 @@ const defaultMarketConsent = {
|
|
|
3236
3241
|
const defaultMetadata$1 = Object.freeze({
|
|
3237
3242
|
enabled: false,
|
|
3238
3243
|
keys: [],
|
|
3244
|
+
requiredKeys: [],
|
|
3239
3245
|
});
|
|
3240
3246
|
const getMetadataConfig = (programTheme) => {
|
|
3241
3247
|
let customMetadata = deepClone(defaultMetadata$1);
|
|
3242
3248
|
try {
|
|
3243
3249
|
if (getSafe(() => programTheme.config.customMetadata.enabled)) {
|
|
3244
|
-
customMetadata = programTheme.config.customMetadata;
|
|
3250
|
+
customMetadata = { ...customMetadata, ...programTheme.config.customMetadata };
|
|
3245
3251
|
}
|
|
3246
3252
|
}
|
|
3247
3253
|
catch (e) {
|
|
3248
3254
|
logger.warn("No custom metadata provided by the server.");
|
|
3249
3255
|
}
|
|
3250
3256
|
if (getOptions().customMetadata) {
|
|
3251
|
-
customMetadata = getOptions().customMetadata;
|
|
3257
|
+
customMetadata = { ...customMetadata, ...getOptions().customMetadata };
|
|
3252
3258
|
}
|
|
3253
3259
|
return customMetadata;
|
|
3254
3260
|
};
|
|
@@ -3758,6 +3764,7 @@ const getAllEmptyViewModels = () => ({
|
|
|
3758
3764
|
cancelSocialSecurityNumber: deepClone(emptyViewModel),
|
|
3759
3765
|
docReviewLimitExceeded: deepClone(emptyViewModel),
|
|
3760
3766
|
cancelDocUpload: deepClone(emptyViewModel),
|
|
3767
|
+
missingRequiredMetadata: deepClone(emptyViewModel),
|
|
3761
3768
|
});
|
|
3762
3769
|
const getFieldValidationErrorsEmpty = () => deepClone(initialErrorStructure);
|
|
3763
3770
|
const getExtendedFieldValidationErrorsEmpty = () => {
|
|
@@ -11121,6 +11128,7 @@ const allMockedResponses = {
|
|
|
11121
11128
|
collectMedicalProfessionalPersonalInfo: mockMedicalProfessionalPersonalInfoResponse,
|
|
11122
11129
|
cancelSocialSecurityNumber: {},
|
|
11123
11130
|
cancelDocUpload: mockCancelDocUploadResponse,
|
|
11131
|
+
missingRequiredMetadata: mockErrorResponse,
|
|
11124
11132
|
};
|
|
11125
11133
|
|
|
11126
11134
|
/**
|
|
@@ -14200,6 +14208,7 @@ const createFetchVerificationRequest = async ({ dispatch, verificationResponsePr
|
|
|
14200
14208
|
dispatch({ type: "IS_LOADING", isLoading: false }),
|
|
14201
14209
|
dispatch({ orgList, type: "PRE_LOAD_ORGS" }),
|
|
14202
14210
|
dispatch({ type: "FORM_VALIDATION_OPTIONS" }),
|
|
14211
|
+
dispatch({ type: "REQUIRED_METADATA_CHECK" }),
|
|
14203
14212
|
]).then(() => {
|
|
14204
14213
|
getHook("ON_VERIFICATION_READY")(verificationResponse);
|
|
14205
14214
|
// This hook is a special case
|
|
@@ -14872,6 +14881,16 @@ const verificationServiceReducer = (state = getInitialState(), action) => {
|
|
|
14872
14881
|
viewModel: state.viewModel,
|
|
14873
14882
|
},
|
|
14874
14883
|
};
|
|
14884
|
+
case "REQUIRED_METADATA_CHECK":
|
|
14885
|
+
const metadataConfig = getMetadataConfig(state.programTheme);
|
|
14886
|
+
const metadata = getMetadata();
|
|
14887
|
+
return {
|
|
14888
|
+
...state,
|
|
14889
|
+
overrideStep: metadataConfig.enabled &&
|
|
14890
|
+
!(metadataConfig.requiredKeys || []).every((k) => metadata.hasOwnProperty(k))
|
|
14891
|
+
? "missingRequiredMetadata"
|
|
14892
|
+
: undefined,
|
|
14893
|
+
};
|
|
14875
14894
|
case "IS_LOADING":
|
|
14876
14895
|
return {
|
|
14877
14896
|
...state,
|
|
@@ -21943,6 +21962,8 @@ const LoadStepComponent = ({ stepToLoad, verificationService }) => {
|
|
|
21943
21962
|
Component = getComponent("StepEmailLoopComponent");
|
|
21944
21963
|
isSecondaryStep = true;
|
|
21945
21964
|
break;
|
|
21965
|
+
case VerificationStepsEnum.missingRequiredMetadata:
|
|
21966
|
+
return (React.createElement(StepErrorComponent, { verificationService: verificationService, errorId: "missingRequiredMetadata" }));
|
|
21946
21967
|
// If explicitly trying to render the error component, such as when testing/styling
|
|
21947
21968
|
case VerificationStepsEnum.error:
|
|
21948
21969
|
Component = getComponent("StepErrorComponent");
|
|
@@ -22018,7 +22039,8 @@ const NewVerificationInnerComponent = ({ locale, messages, programTheme, verific
|
|
|
22018
22039
|
React.createElement(IntlProvider, { locale: "en", key: locale, messages: messagesWithOptions, textComponent: CustomTextWrapper },
|
|
22019
22040
|
React.createElement(CustomCssWrapperComponent, { styles: getCustomCss(programTheme) }, verificationService.isLoading ? (React.createElement(LoadingScreenComponent, { step: verificationService.loadingStep })) : (React.createElement("div", { className: `${rtlDetect_1.isRtlLang(modernizeLocale(locale)) ? "sid-rtl" : "sid-ltr"} sid-locale-${locale}` },
|
|
22020
22041
|
!getOptions().hideTestModeFlag && (React.createElement(TestModeFlagComponent, { verificationService: verificationService })),
|
|
22021
|
-
React.createElement(LoadStepComponent, { stepToLoad: verificationService.
|
|
22042
|
+
React.createElement(LoadStepComponent, { stepToLoad: verificationService.overrideStep ||
|
|
22043
|
+
verificationService.verificationResponse.currentStep, verificationService: verificationService }))))));
|
|
22022
22044
|
};
|
|
22023
22045
|
|
|
22024
22046
|
/*
|