idmission-web-sdk 2.2.26 → 2.2.28
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/dist/components/customer_flows/CustomerIdAndBiometricsEnrollment.d.ts +2 -0
- package/dist/components/customer_flows/CustomerIdAndBiometricsEnrollment.d.ts.map +1 -1
- package/dist/components/customer_flows/IdAndFaceValidation.d.ts +2 -0
- package/dist/components/customer_flows/IdAndFaceValidation.d.ts.map +1 -1
- package/dist/lib/models/DocumentDetection.d.ts +1 -0
- package/dist/lib/models/DocumentDetection.d.ts.map +1 -1
- package/dist/lib/models/FaceDetection.d.ts +2 -1
- package/dist/lib/models/FaceDetection.d.ts.map +1 -1
- package/dist/lib/models/Focus.d.ts +1 -0
- package/dist/lib/models/Focus.d.ts.map +1 -1
- package/dist/sdk2.cjs.development.js +128 -77
- package/dist/sdk2.cjs.development.js.map +1 -1
- package/dist/sdk2.cjs.production.js +1 -1
- package/dist/sdk2.cjs.production.js.map +1 -1
- package/dist/sdk2.esm.js +128 -77
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +128 -77
- package/dist/sdk2.umd.development.js.map +1 -1
- package/dist/sdk2.umd.production.js +1 -1
- package/dist/sdk2.umd.production.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +3 -3
|
@@ -211,7 +211,7 @@
|
|
|
211
211
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
212
212
|
};
|
|
213
213
|
|
|
214
|
-
var webSdkVersion = '2.2.
|
|
214
|
+
var webSdkVersion = '2.2.28';
|
|
215
215
|
|
|
216
216
|
function getPlatform() {
|
|
217
217
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -8896,6 +8896,15 @@
|
|
|
8896
8896
|
});
|
|
8897
8897
|
});
|
|
8898
8898
|
}
|
|
8899
|
+
function closeFocusModel(modelAssetPath) {
|
|
8900
|
+
if (modelAssetPath === void 0) {
|
|
8901
|
+
modelAssetPath = defaultFocusModelPath;
|
|
8902
|
+
}
|
|
8903
|
+
var id = "".concat(modelAssetPath);
|
|
8904
|
+
if (!models[id]) return;
|
|
8905
|
+
models[id].close();
|
|
8906
|
+
delete models[id];
|
|
8907
|
+
}
|
|
8899
8908
|
function useLoadFocusModel(_a) {
|
|
8900
8909
|
var _b = _a.modelPath,
|
|
8901
8910
|
modelPath = _b === void 0 ? defaultFocusModelPath : _b,
|
|
@@ -8948,6 +8957,9 @@
|
|
|
8948
8957
|
clearTimeout(modelLoadTimeout);
|
|
8949
8958
|
});
|
|
8950
8959
|
return function () {
|
|
8960
|
+
log('unloading focus model', model.current);
|
|
8961
|
+
model.current = null;
|
|
8962
|
+
closeFocusModel(modelPath);
|
|
8951
8963
|
clearTimeout(modelLoadTimeout);
|
|
8952
8964
|
document.removeEventListener('idmission.preloadProgress.focus', handleDownloadProgress);
|
|
8953
8965
|
};
|
|
@@ -9001,38 +9013,53 @@
|
|
|
9001
9013
|
}
|
|
9002
9014
|
|
|
9003
9015
|
var defaultSelfieCaptureModelLoadTimeoutMs = 45000;
|
|
9004
|
-
var
|
|
9016
|
+
var detectors$1 = {};
|
|
9005
9017
|
function loadFaceDetector() {
|
|
9006
|
-
return __awaiter(this,
|
|
9007
|
-
var _a, _b;
|
|
9008
|
-
|
|
9009
|
-
|
|
9018
|
+
return __awaiter(this, arguments, void 0, function (modelAssetPath) {
|
|
9019
|
+
var id, _a, _b, _c, _d;
|
|
9020
|
+
if (modelAssetPath === void 0) {
|
|
9021
|
+
modelAssetPath = defaultFaceDetectorModelPath;
|
|
9022
|
+
}
|
|
9023
|
+
return __generator(this, function (_e) {
|
|
9024
|
+
switch (_e.label) {
|
|
9010
9025
|
case 0:
|
|
9011
|
-
|
|
9026
|
+
id = "".concat(modelAssetPath);
|
|
9027
|
+
if (detectors$1[id]) return [2 /*return*/, detectors$1[id]];
|
|
9012
9028
|
return [4 /*yield*/, preloadFaceDetectorDependencies()];
|
|
9013
9029
|
case 1:
|
|
9014
|
-
|
|
9030
|
+
_e.sent();
|
|
9015
9031
|
if (modelCapabilities.delegate === 'NONE') {
|
|
9016
9032
|
throw new Error('No available delegate for face detector.');
|
|
9017
9033
|
}
|
|
9018
|
-
|
|
9034
|
+
_a = detectors$1;
|
|
9035
|
+
_b = id;
|
|
9036
|
+
_d = (_c = ya).createFromOptions;
|
|
9019
9037
|
return [4 /*yield*/, ao.forVisionTasks(visionTasksBasePath)];
|
|
9020
9038
|
case 2:
|
|
9021
|
-
return [4 /*yield*/,
|
|
9039
|
+
return [4 /*yield*/, _d.apply(_c, [_e.sent(), {
|
|
9022
9040
|
// canvas: document.createElement('canvas'),
|
|
9023
9041
|
baseOptions: {
|
|
9024
|
-
modelAssetPath:
|
|
9042
|
+
modelAssetPath: modelAssetPath,
|
|
9025
9043
|
delegate: modelCapabilities.delegate
|
|
9026
9044
|
},
|
|
9027
9045
|
runningMode: 'VIDEO'
|
|
9028
9046
|
}])];
|
|
9029
9047
|
case 3:
|
|
9030
|
-
|
|
9031
|
-
return [2 /*return*/,
|
|
9048
|
+
_a[_b] = _e.sent();
|
|
9049
|
+
return [2 /*return*/, detectors$1[id]];
|
|
9032
9050
|
}
|
|
9033
9051
|
});
|
|
9034
9052
|
});
|
|
9035
9053
|
}
|
|
9054
|
+
function closeFaceDetector(modelAssetPath) {
|
|
9055
|
+
if (modelAssetPath === void 0) {
|
|
9056
|
+
modelAssetPath = defaultFaceDetectorModelPath;
|
|
9057
|
+
}
|
|
9058
|
+
var id = "".concat(modelAssetPath);
|
|
9059
|
+
if (!detectors$1[id]) return;
|
|
9060
|
+
detectors$1[id].close();
|
|
9061
|
+
delete detectors$1[id];
|
|
9062
|
+
}
|
|
9036
9063
|
function useLoadFaceDetector(_a) {
|
|
9037
9064
|
var onModelError = _a.onModelError,
|
|
9038
9065
|
_b = _a.modelLoadTimeoutMs,
|
|
@@ -9081,6 +9108,9 @@
|
|
|
9081
9108
|
clearTimeout(modelLoadTimeout);
|
|
9082
9109
|
});
|
|
9083
9110
|
return function () {
|
|
9111
|
+
log('unloading face detection model', detector.current);
|
|
9112
|
+
detector.current = null;
|
|
9113
|
+
closeFaceDetector();
|
|
9084
9114
|
clearTimeout(modelLoadTimeout);
|
|
9085
9115
|
document.removeEventListener('idmission.preloadProgress.faceDetection', handleDownloadProgress);
|
|
9086
9116
|
};
|
|
@@ -9503,6 +9533,18 @@
|
|
|
9503
9533
|
});
|
|
9504
9534
|
});
|
|
9505
9535
|
}
|
|
9536
|
+
function closeDocumentDetector(modelAssetPath, scoreThreshold) {
|
|
9537
|
+
if (modelAssetPath === void 0) {
|
|
9538
|
+
modelAssetPath = defaultDocumentDetectorModelPath;
|
|
9539
|
+
}
|
|
9540
|
+
if (scoreThreshold === void 0) {
|
|
9541
|
+
scoreThreshold = defaultDocumentDetectionScoreThreshold;
|
|
9542
|
+
}
|
|
9543
|
+
var id = "".concat(modelAssetPath, ":").concat(scoreThreshold);
|
|
9544
|
+
if (!detectors[id]) return;
|
|
9545
|
+
detectors[id].close();
|
|
9546
|
+
delete detectors[id];
|
|
9547
|
+
}
|
|
9506
9548
|
function useLoadDocumentDetector(_a) {
|
|
9507
9549
|
var _b = _a.modelPath,
|
|
9508
9550
|
modelPath = _b === void 0 ? defaultDocumentDetectorModelPath : _b,
|
|
@@ -9557,6 +9599,9 @@
|
|
|
9557
9599
|
clearTimeout(modelLoadTimeout);
|
|
9558
9600
|
});
|
|
9559
9601
|
return function () {
|
|
9602
|
+
log('unloading document detection model');
|
|
9603
|
+
detector.current = null;
|
|
9604
|
+
closeDocumentDetector(modelPath, scoreThreshold);
|
|
9560
9605
|
clearTimeout(modelLoadTimeout);
|
|
9561
9606
|
document.removeEventListener('idmission.preloadProgress.documentDetection', handleDownloadProgress);
|
|
9562
9607
|
};
|
|
@@ -23253,14 +23298,16 @@
|
|
|
23253
23298
|
idCaptureRotateLoadingOverlayImageWhenPortrait = _m === void 0 ? true : _m,
|
|
23254
23299
|
_o = _a.idCaptureModelLoadTimeoutMs,
|
|
23255
23300
|
idCaptureModelLoadTimeoutMs = _o === void 0 ? defaultDocumentDetectionModelLoadTimeoutMs : _o,
|
|
23256
|
-
_p = _a.
|
|
23257
|
-
|
|
23258
|
-
_q = _a.
|
|
23259
|
-
|
|
23260
|
-
_r = _a.
|
|
23261
|
-
|
|
23262
|
-
_s = _a.
|
|
23263
|
-
|
|
23301
|
+
_p = _a.idCaptureForceFallbackMode,
|
|
23302
|
+
idCaptureForceFallbackMode = _p === void 0 ? false : _p,
|
|
23303
|
+
_q = _a.selfieCaptureModelLoadTimeoutMs,
|
|
23304
|
+
selfieCaptureModelLoadTimeoutMs = _q === void 0 ? defaultSelfieCaptureModelLoadTimeoutMs : _q,
|
|
23305
|
+
_r = _a.allowIdCardBackToFrontCapture,
|
|
23306
|
+
allowIdCardBackToFrontCapture = _r === void 0 ? false : _r,
|
|
23307
|
+
_s = _a.enableOverrideWrongDocumentTypeDialog,
|
|
23308
|
+
enableOverrideWrongDocumentTypeDialog = _s === void 0 ? false : _s,
|
|
23309
|
+
_t = _a.allowOverrideWrongDocumentTypeAfterMs,
|
|
23310
|
+
allowOverrideWrongDocumentTypeAfterMs = _t === void 0 ? 8000 : _t,
|
|
23264
23311
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
23265
23312
|
onDocumentUploaded = _a.onDocumentUploaded,
|
|
23266
23313
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
@@ -23277,28 +23324,28 @@
|
|
|
23277
23324
|
onIdCaptureModelError = _a.onIdCaptureModelError,
|
|
23278
23325
|
onSelfieCaptureModelError = _a.onSelfieCaptureModelError,
|
|
23279
23326
|
onCameraAccessDenied = _a.onCameraAccessDenied,
|
|
23280
|
-
|
|
23281
|
-
captureSignature =
|
|
23282
|
-
|
|
23283
|
-
captureSignatureVideo =
|
|
23284
|
-
|
|
23285
|
-
captureAdditionalDocuments =
|
|
23286
|
-
|
|
23287
|
-
theme =
|
|
23288
|
-
|
|
23289
|
-
assets =
|
|
23290
|
-
|
|
23291
|
-
classNames =
|
|
23292
|
-
|
|
23293
|
-
colors =
|
|
23294
|
-
|
|
23295
|
-
verbiage =
|
|
23296
|
-
|
|
23297
|
-
geolocationEnabled =
|
|
23298
|
-
|
|
23299
|
-
geolocationRequired =
|
|
23300
|
-
|
|
23301
|
-
debugMode =
|
|
23327
|
+
_u = _a.captureSignature,
|
|
23328
|
+
captureSignature = _u === void 0 ? false : _u,
|
|
23329
|
+
_v = _a.captureSignatureVideo,
|
|
23330
|
+
captureSignatureVideo = _v === void 0 ? false : _v,
|
|
23331
|
+
_w = _a.captureAdditionalDocuments,
|
|
23332
|
+
captureAdditionalDocuments = _w === void 0 ? [] : _w,
|
|
23333
|
+
_x = _a.theme,
|
|
23334
|
+
theme = _x === void 0 ? 'default' : _x,
|
|
23335
|
+
_y = _a.assets,
|
|
23336
|
+
assets = _y === void 0 ? {} : _y,
|
|
23337
|
+
_z = _a.classNames,
|
|
23338
|
+
classNames = _z === void 0 ? {} : _z,
|
|
23339
|
+
_0 = _a.colors,
|
|
23340
|
+
colors = _0 === void 0 ? {} : _0,
|
|
23341
|
+
_1 = _a.verbiage,
|
|
23342
|
+
verbiage = _1 === void 0 ? {} : _1,
|
|
23343
|
+
_2 = _a.geolocationEnabled,
|
|
23344
|
+
geolocationEnabled = _2 === void 0 ? true : _2,
|
|
23345
|
+
_3 = _a.geolocationRequired,
|
|
23346
|
+
geolocationRequired = _3 === void 0 ? false : _3,
|
|
23347
|
+
_4 = _a.debugMode,
|
|
23348
|
+
debugMode = _4 === void 0 ? false : _4;
|
|
23302
23349
|
useLanguage(lang);
|
|
23303
23350
|
useDebugLogging(debugMode);
|
|
23304
23351
|
var idCaptureProps = React.useMemo(function () {
|
|
@@ -23323,10 +23370,11 @@
|
|
|
23323
23370
|
allowIdCardBackToFrontCapture: allowIdCardBackToFrontCapture,
|
|
23324
23371
|
enableOverrideWrongDocumentTypeDialog: enableOverrideWrongDocumentTypeDialog,
|
|
23325
23372
|
allowOverrideWrongDocumentTypeAfterMs: allowOverrideWrongDocumentTypeAfterMs,
|
|
23373
|
+
forceFallbackMode: idCaptureForceFallbackMode,
|
|
23326
23374
|
skipSuccessScreen: skipSuccessScreen,
|
|
23327
23375
|
debugMode: debugMode
|
|
23328
23376
|
};
|
|
23329
|
-
}, [onExitCapture, onUserCancel, onIdCaptureModelError, assets.idCapture, classNames.idCapture, colors.idCapture, verbiage.idCapture, precapturedDocuments, idCaptureRequirement, idCaptureThresholds, idCaptureLoadingOverlayMode, idCaptureInstructions, idCaptureGuideType, idCaptureGuideImages, idCapturePortraitGuidesOnMobile, idCaptureRotateLoadingOverlayImageWhenPortrait, idCaptureModelLoadTimeoutMs, allowIdCardBackToFrontCapture, enableOverrideWrongDocumentTypeDialog, allowOverrideWrongDocumentTypeAfterMs, skipSuccessScreen, debugMode]);
|
|
23377
|
+
}, [onExitCapture, onUserCancel, onIdCaptureModelError, assets.idCapture, classNames.idCapture, colors.idCapture, verbiage.idCapture, precapturedDocuments, idCaptureRequirement, idCaptureThresholds, idCaptureLoadingOverlayMode, idCaptureInstructions, idCaptureGuideType, idCaptureGuideImages, idCapturePortraitGuidesOnMobile, idCaptureRotateLoadingOverlayImageWhenPortrait, idCaptureModelLoadTimeoutMs, allowIdCardBackToFrontCapture, enableOverrideWrongDocumentTypeDialog, allowOverrideWrongDocumentTypeAfterMs, idCaptureForceFallbackMode, skipSuccessScreen, debugMode]);
|
|
23330
23378
|
var faceLivenessProps = React.useMemo(function () {
|
|
23331
23379
|
return {
|
|
23332
23380
|
loadingOverlayMode: faceLivenessLoadingOverlayMode,
|
|
@@ -23487,14 +23535,16 @@
|
|
|
23487
23535
|
idCaptureRotateLoadingOverlayImageWhenPortrait = _m === void 0 ? true : _m,
|
|
23488
23536
|
_o = _a.idCaptureModelLoadTimeoutMs,
|
|
23489
23537
|
idCaptureModelLoadTimeoutMs = _o === void 0 ? defaultDocumentDetectionModelLoadTimeoutMs : _o,
|
|
23490
|
-
_p = _a.
|
|
23491
|
-
|
|
23492
|
-
_q = _a.
|
|
23493
|
-
|
|
23494
|
-
_r = _a.
|
|
23495
|
-
|
|
23496
|
-
_s = _a.
|
|
23497
|
-
|
|
23538
|
+
_p = _a.idCaptureForceFallbackMode,
|
|
23539
|
+
idCaptureForceFallbackMode = _p === void 0 ? false : _p,
|
|
23540
|
+
_q = _a.selfieCaptureModelLoadTimeoutMs,
|
|
23541
|
+
selfieCaptureModelLoadTimeoutMs = _q === void 0 ? defaultSelfieCaptureModelLoadTimeoutMs : _q,
|
|
23542
|
+
_r = _a.allowIdCardBackToFrontCapture,
|
|
23543
|
+
allowIdCardBackToFrontCapture = _r === void 0 ? false : _r,
|
|
23544
|
+
_s = _a.enableOverrideWrongDocumentTypeDialog,
|
|
23545
|
+
enableOverrideWrongDocumentTypeDialog = _s === void 0 ? false : _s,
|
|
23546
|
+
_t = _a.allowOverrideWrongDocumentTypeAfterMs,
|
|
23547
|
+
allowOverrideWrongDocumentTypeAfterMs = _t === void 0 ? 8000 : _t,
|
|
23498
23548
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
23499
23549
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
23500
23550
|
onDocumentUploaded = _a.onDocumentUploaded,
|
|
@@ -23510,31 +23560,31 @@
|
|
|
23510
23560
|
onIdCaptureModelError = _a.onIdCaptureModelError,
|
|
23511
23561
|
onSelfieCaptureModelError = _a.onSelfieCaptureModelError,
|
|
23512
23562
|
onCameraAccessDenied = _a.onCameraAccessDenied,
|
|
23513
|
-
|
|
23514
|
-
captureSignature =
|
|
23515
|
-
|
|
23516
|
-
captureSignatureVideo =
|
|
23517
|
-
|
|
23518
|
-
captureAdditionalDocuments =
|
|
23519
|
-
|
|
23520
|
-
captureVideoId =
|
|
23563
|
+
_u = _a.captureSignature,
|
|
23564
|
+
captureSignature = _u === void 0 ? false : _u,
|
|
23565
|
+
_v = _a.captureSignatureVideo,
|
|
23566
|
+
captureSignatureVideo = _v === void 0 ? false : _v,
|
|
23567
|
+
_w = _a.captureAdditionalDocuments,
|
|
23568
|
+
captureAdditionalDocuments = _w === void 0 ? [] : _w,
|
|
23569
|
+
_x = _a.captureVideoId,
|
|
23570
|
+
captureVideoId = _x === void 0 ? false : _x,
|
|
23521
23571
|
captureVideoIdProps = _a.captureVideoIdProps,
|
|
23522
|
-
|
|
23523
|
-
theme =
|
|
23524
|
-
|
|
23525
|
-
assets =
|
|
23526
|
-
|
|
23527
|
-
classNames =
|
|
23528
|
-
|
|
23529
|
-
colors =
|
|
23530
|
-
|
|
23531
|
-
verbiage =
|
|
23532
|
-
|
|
23533
|
-
geolocationEnabled =
|
|
23534
|
-
|
|
23535
|
-
geolocationRequired =
|
|
23536
|
-
|
|
23537
|
-
debugMode =
|
|
23572
|
+
_y = _a.theme,
|
|
23573
|
+
theme = _y === void 0 ? 'default' : _y,
|
|
23574
|
+
_z = _a.assets,
|
|
23575
|
+
assets = _z === void 0 ? {} : _z,
|
|
23576
|
+
_0 = _a.classNames,
|
|
23577
|
+
classNames = _0 === void 0 ? {} : _0,
|
|
23578
|
+
_1 = _a.colors,
|
|
23579
|
+
colors = _1 === void 0 ? {} : _1,
|
|
23580
|
+
_2 = _a.verbiage,
|
|
23581
|
+
verbiage = _2 === void 0 ? {} : _2,
|
|
23582
|
+
_3 = _a.geolocationEnabled,
|
|
23583
|
+
geolocationEnabled = _3 === void 0 ? true : _3,
|
|
23584
|
+
_4 = _a.geolocationRequired,
|
|
23585
|
+
geolocationRequired = _4 === void 0 ? false : _4,
|
|
23586
|
+
_5 = _a.debugMode,
|
|
23587
|
+
debugMode = _5 === void 0 ? false : _5;
|
|
23538
23588
|
useLanguage(lang);
|
|
23539
23589
|
useDebugLogging(debugMode);
|
|
23540
23590
|
var idCaptureProps = React.useMemo(function () {
|
|
@@ -23553,6 +23603,7 @@
|
|
|
23553
23603
|
rotateLoadingOverlayImageWhenPortrait: idCaptureRotateLoadingOverlayImageWhenPortrait,
|
|
23554
23604
|
modelLoadTimeoutMs: idCaptureModelLoadTimeoutMs,
|
|
23555
23605
|
allowIdCardBackToFrontCapture: allowIdCardBackToFrontCapture,
|
|
23606
|
+
forceFallbackMode: idCaptureForceFallbackMode,
|
|
23556
23607
|
enableOverrideWrongDocumentTypeDialog: enableOverrideWrongDocumentTypeDialog,
|
|
23557
23608
|
allowOverrideWrongDocumentTypeAfterMs: allowOverrideWrongDocumentTypeAfterMs,
|
|
23558
23609
|
onExitCapture: onExitCapture,
|
|
@@ -23561,7 +23612,7 @@
|
|
|
23561
23612
|
skipSuccessScreen: skipSuccessScreen,
|
|
23562
23613
|
debugMode: debugMode
|
|
23563
23614
|
};
|
|
23564
|
-
}, [assets.idCapture, classNames.idCapture, colors.idCapture, verbiage.idCapture, idCaptureRequirement, idCaptureThresholds, idCaptureLoadingOverlayMode, idCaptureInstructions, idCaptureGuideType, idCaptureGuideImages, idCapturePortraitGuidesOnMobile, idCaptureRotateLoadingOverlayImageWhenPortrait, idCaptureModelLoadTimeoutMs, allowIdCardBackToFrontCapture, enableOverrideWrongDocumentTypeDialog, allowOverrideWrongDocumentTypeAfterMs, onExitCapture, onUserCancel, onIdCaptureModelError, skipSuccessScreen, debugMode]);
|
|
23615
|
+
}, [assets.idCapture, classNames.idCapture, colors.idCapture, verbiage.idCapture, idCaptureRequirement, idCaptureThresholds, idCaptureLoadingOverlayMode, idCaptureInstructions, idCaptureGuideType, idCaptureGuideImages, idCapturePortraitGuidesOnMobile, idCaptureRotateLoadingOverlayImageWhenPortrait, idCaptureModelLoadTimeoutMs, allowIdCardBackToFrontCapture, idCaptureForceFallbackMode, enableOverrideWrongDocumentTypeDialog, allowOverrideWrongDocumentTypeAfterMs, onExitCapture, onUserCancel, onIdCaptureModelError, skipSuccessScreen, debugMode]);
|
|
23565
23616
|
var faceLivenessProps = React.useMemo(function () {
|
|
23566
23617
|
return {
|
|
23567
23618
|
onExitCapture: onExitCapture,
|