idmission-web-sdk 2.1.29 → 2.1.30
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/sdk2.cjs.development.js +7 -6
- 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 +7 -6
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +7 -6
- 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 +1 -1
|
@@ -234,7 +234,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
234
234
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
235
235
|
};
|
|
236
236
|
|
|
237
|
-
var webSdkVersion = '2.1.
|
|
237
|
+
var webSdkVersion = '2.1.30';
|
|
238
238
|
|
|
239
239
|
function getPlatform() {
|
|
240
240
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -5363,8 +5363,8 @@ var defaultDocumentDetectorModelPath = "https://websdk-cdn-dev.idmission.com/ass
|
|
|
5363
5363
|
var defaultDocumentDetectionScoreThreshold = 0.1;
|
|
5364
5364
|
var defaultDocumentDetectionModelLoadTimeoutMs = 45000;
|
|
5365
5365
|
var defaultDocumentDetectionThresholds = {
|
|
5366
|
-
idCardFront: 0.
|
|
5367
|
-
idCardBack: 0.
|
|
5366
|
+
idCardFront: 0.7,
|
|
5367
|
+
idCardBack: 0.7,
|
|
5368
5368
|
passport: 0.5
|
|
5369
5369
|
};
|
|
5370
5370
|
var documentTypeDisplayNames = {
|
|
@@ -6261,7 +6261,7 @@ var _reducer = function reducer(state, action) {
|
|
|
6261
6261
|
}
|
|
6262
6262
|
}
|
|
6263
6263
|
var flipRequired = !state.overrideFlipRequirement && !state.allowIdCardBackToFrontCapture && state.requestedDocumentType === 'idCardBack' && detectedDocumentType === 'idCardFront';
|
|
6264
|
-
var backDetectedFirst = state.allowIdCardBackToFrontCapture ? 'idCardBack' in state.capturedDocuments && detectedDocumentType === 'idCardBack' : state.requestedDocumentType.includes('idCardFront') && detectedDocumentType === 'idCardBack';
|
|
6264
|
+
var backDetectedFirst = !state.overrideFlipRequirement && (state.allowIdCardBackToFrontCapture ? 'idCardBack' in state.capturedDocuments && detectedDocumentType === 'idCardBack' : state.requestedDocumentType.includes('idCardFront') && detectedDocumentType === 'idCardBack');
|
|
6265
6265
|
var isGoodFrame = detectionThresholdMet && documentInBounds && !documentTooClose && !flipRequired && !backDetectedFirst && focusThresholdMet;
|
|
6266
6266
|
var goodFramesCount = state.goodFramesCount;
|
|
6267
6267
|
if (isGoodFrame) {
|
|
@@ -6454,8 +6454,9 @@ var IdCaptureStateProvider = function IdCaptureStateProvider(_a) {
|
|
|
6454
6454
|
}, [onResize]);
|
|
6455
6455
|
var setRequiredDocumentType = React.useContext(IdCaptureModelsContext).setRequiredDocumentType;
|
|
6456
6456
|
React.useEffect(function () {
|
|
6457
|
+
if (state.allowOverrideFlipRequirement) return;
|
|
6457
6458
|
if (state.captureState !== 'capturing') return;
|
|
6458
|
-
if (!state.flipRequired
|
|
6459
|
+
if (!state.flipRequired && !state.backDetectedFirst) return;
|
|
6459
6460
|
var t = setTimeout(function () {
|
|
6460
6461
|
dispatch({
|
|
6461
6462
|
type: 'allowOverrideFlipRequirement'
|
|
@@ -6464,7 +6465,7 @@ var IdCaptureStateProvider = function IdCaptureStateProvider(_a) {
|
|
|
6464
6465
|
return function () {
|
|
6465
6466
|
clearTimeout(t);
|
|
6466
6467
|
};
|
|
6467
|
-
}, [flipRequiredTimeout, state.allowOverrideFlipRequirement, state.captureState, state.flipRequired]);
|
|
6468
|
+
}, [flipRequiredTimeout, state.allowOverrideFlipRequirement, state.backDetectedFirst, state.captureState, state.flipRequired]);
|
|
6468
6469
|
React.useEffect(function () {
|
|
6469
6470
|
if (state.overrideFlipRequirement) {
|
|
6470
6471
|
setRequiredDocumentType('none');
|