idmission-web-sdk 2.2.156 → 2.2.158
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/submission/SubmissionProvider.d.ts +2 -1
- package/dist/components/submission/SubmissionProvider.d.ts.map +1 -1
- package/dist/components/video_signature_capture/VideoSignatureGuides.d.ts.map +1 -1
- package/dist/sdk2.cjs.development.js +72 -68
- 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 +72 -68
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +72 -68
- 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.158';
|
|
215
215
|
|
|
216
216
|
function getPlatform() {
|
|
217
217
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -2159,83 +2159,85 @@
|
|
|
2159
2159
|
_y = _a.estimateAge,
|
|
2160
2160
|
estimateAge = _y === void 0 ? false : _y,
|
|
2161
2161
|
_z = _a.predictGender,
|
|
2162
|
-
predictGender = _z === void 0 ? false : _z
|
|
2162
|
+
predictGender = _z === void 0 ? false : _z,
|
|
2163
|
+
_0 = _a.throwErrorsOnFailure,
|
|
2164
|
+
throwErrorsOnFailure = _0 === void 0 ? !userSuppliedOnRequestFailure : _0;
|
|
2163
2165
|
var sessionId = useAuthContext()[0].sessionId;
|
|
2164
|
-
var
|
|
2165
|
-
submissionStatus =
|
|
2166
|
-
setSubmissionStatus =
|
|
2167
|
-
var _1 = React.useState(null),
|
|
2168
|
-
submissionRequest = _1[0],
|
|
2169
|
-
setSubmissionRequest = _1[1];
|
|
2166
|
+
var _1 = React.useState(SubmissionStatus.READY),
|
|
2167
|
+
submissionStatus = _1[0],
|
|
2168
|
+
setSubmissionStatus = _1[1];
|
|
2170
2169
|
var _2 = React.useState(null),
|
|
2171
|
-
|
|
2172
|
-
|
|
2170
|
+
submissionRequest = _2[0],
|
|
2171
|
+
setSubmissionRequest = _2[1];
|
|
2173
2172
|
var _3 = React.useState(null),
|
|
2174
|
-
|
|
2175
|
-
|
|
2173
|
+
submissionResponse = _3[0],
|
|
2174
|
+
setSubmissionResponse = _3[1];
|
|
2176
2175
|
var _4 = React.useState(null),
|
|
2177
|
-
|
|
2178
|
-
|
|
2176
|
+
submissionError = _4[0],
|
|
2177
|
+
setSubmissionError = _4[1];
|
|
2179
2178
|
var _5 = React.useState(null),
|
|
2180
|
-
|
|
2181
|
-
|
|
2179
|
+
retrySubmission = _5[0],
|
|
2180
|
+
setRetrySubmission = _5[1];
|
|
2182
2181
|
var _6 = React.useState(null),
|
|
2183
|
-
|
|
2184
|
-
|
|
2182
|
+
livenessCheckRequest = _6[0],
|
|
2183
|
+
setLivenessCheckRequest = _6[1];
|
|
2185
2184
|
var _7 = React.useState(null),
|
|
2186
|
-
|
|
2187
|
-
|
|
2185
|
+
idFrontImage = _7[0],
|
|
2186
|
+
setIdFrontImage = _7[1];
|
|
2188
2187
|
var _8 = React.useState(null),
|
|
2189
|
-
|
|
2190
|
-
|
|
2188
|
+
idBackImage = _8[0],
|
|
2189
|
+
setIdBackImage = _8[1];
|
|
2191
2190
|
var _9 = React.useState(null),
|
|
2192
|
-
|
|
2193
|
-
|
|
2191
|
+
passportImage = _9[0],
|
|
2192
|
+
setPassportImage = _9[1];
|
|
2194
2193
|
var _10 = React.useState(null),
|
|
2195
|
-
|
|
2196
|
-
|
|
2194
|
+
selfieImage = _10[0],
|
|
2195
|
+
setSelfieImage = _10[1];
|
|
2197
2196
|
var _11 = React.useState(null),
|
|
2198
|
-
|
|
2199
|
-
|
|
2197
|
+
signatureData = _11[0],
|
|
2198
|
+
setSignatureData = _11[1];
|
|
2200
2199
|
var _12 = React.useState(null),
|
|
2201
|
-
|
|
2202
|
-
|
|
2200
|
+
signatureVideoUrl = _12[0],
|
|
2201
|
+
setSignatureVideoUrl = _12[1];
|
|
2203
2202
|
var _13 = React.useState(null),
|
|
2204
|
-
|
|
2205
|
-
|
|
2203
|
+
idCaptureVideoUrl = _13[0],
|
|
2204
|
+
setIdCaptureVideoUrl = _13[1];
|
|
2206
2205
|
var _14 = React.useState(null),
|
|
2207
|
-
|
|
2208
|
-
|
|
2206
|
+
idCaptureVideoIdFrontImage = _14[0],
|
|
2207
|
+
setIdCaptureVideoIdFrontImage = _14[1];
|
|
2209
2208
|
var _15 = React.useState(null),
|
|
2210
|
-
|
|
2211
|
-
|
|
2209
|
+
idCaptureVideoIdBackImage = _15[0],
|
|
2210
|
+
setIdCaptureVideoIdBackImage = _15[1];
|
|
2212
2211
|
var _16 = React.useState(null),
|
|
2213
|
-
|
|
2214
|
-
|
|
2212
|
+
idCaptureVideoAudioUrl = _16[0],
|
|
2213
|
+
setIdCaptureVideoAudioUrl = _16[1];
|
|
2215
2214
|
var _17 = React.useState(null),
|
|
2216
|
-
|
|
2217
|
-
|
|
2215
|
+
idCaptureVideoAudioStartsAt = _17[0],
|
|
2216
|
+
setIdCaptureVideoAudioStartsAt = _17[1];
|
|
2218
2217
|
var _18 = React.useState(null),
|
|
2219
|
-
|
|
2220
|
-
|
|
2218
|
+
expectedAudioText = _18[0],
|
|
2219
|
+
setExpectedAudioText = _18[1];
|
|
2221
2220
|
var _19 = React.useState(null),
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
var _20 = React.useState(
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
var _21 = React.useState(
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
var _22 = React.useState(
|
|
2231
|
-
|
|
2232
|
-
|
|
2221
|
+
additionalDocuments = _19[0],
|
|
2222
|
+
setAdditionalDocuments = _19[1];
|
|
2223
|
+
var _20 = React.useState(null),
|
|
2224
|
+
geolocationResult = _20[0],
|
|
2225
|
+
setGeolocationResult = _20[1];
|
|
2226
|
+
var _21 = React.useState(0),
|
|
2227
|
+
geolocationAttempts = _21[0],
|
|
2228
|
+
setGeolocationAttempts = _21[1];
|
|
2229
|
+
var _22 = React.useState(false),
|
|
2230
|
+
geolocationBlocked = _22[0],
|
|
2231
|
+
setGeolocationBlocked = _22[1];
|
|
2233
2232
|
var _23 = React.useState([]),
|
|
2234
|
-
|
|
2235
|
-
|
|
2233
|
+
idFrontCaptureAttempts = _23[0],
|
|
2234
|
+
setIdFrontCaptureAttempts = _23[1];
|
|
2236
2235
|
var _24 = React.useState([]),
|
|
2237
|
-
|
|
2238
|
-
|
|
2236
|
+
idBackCaptureAttempts = _24[0],
|
|
2237
|
+
setIdBackCaptureAttempts = _24[1];
|
|
2238
|
+
var _25 = React.useState([]),
|
|
2239
|
+
selfieCaptureAttempts = _25[0],
|
|
2240
|
+
setSelfieCaptureAttempts = _25[1];
|
|
2239
2241
|
var logIdFrontCaptureAttempt = React.useCallback(function (attempt) {
|
|
2240
2242
|
setIdFrontCaptureAttempts(function (attempts) {
|
|
2241
2243
|
return __spreadArray(__spreadArray([], attempts, true), [attempt], false);
|
|
@@ -2612,13 +2614,14 @@
|
|
|
2612
2614
|
} : defaultOnSubmit;
|
|
2613
2615
|
});
|
|
2614
2616
|
(_c = onRequestFailure.current) === null || _c === void 0 ? void 0 : _c.call(onRequestFailure, err);
|
|
2615
|
-
throw err;
|
|
2617
|
+
if (throwErrorsOnFailure) throw err;
|
|
2618
|
+
return [3 /*break*/, 8];
|
|
2616
2619
|
case 8:
|
|
2617
2620
|
return [2 /*return*/];
|
|
2618
2621
|
}
|
|
2619
2622
|
});
|
|
2620
2623
|
});
|
|
2621
|
-
}, [action, buildSubmissionPayload, submissionUrl, environment, idFrontImage, idBackImage, passportImage, selfieImage, sessionId, sendBase64DocumentsInSwaggerProxy]);
|
|
2624
|
+
}, [action, buildSubmissionPayload, submissionUrl, environment, idFrontImage, idBackImage, passportImage, selfieImage, sessionId, sendBase64DocumentsInSwaggerProxy, throwErrorsOnFailure]);
|
|
2622
2625
|
var submit = React.useCallback(function () {
|
|
2623
2626
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
2624
2627
|
var _a, _b;
|
|
@@ -2766,13 +2769,14 @@
|
|
|
2766
2769
|
};
|
|
2767
2770
|
});
|
|
2768
2771
|
(_a = onRequestFailure.current) === null || _a === void 0 ? void 0 : _a.call(onRequestFailure, err);
|
|
2769
|
-
throw err;
|
|
2772
|
+
if (throwErrorsOnFailure) throw err;
|
|
2773
|
+
return [3 /*break*/, 7];
|
|
2770
2774
|
case 7:
|
|
2771
2775
|
return [2 /*return*/];
|
|
2772
2776
|
}
|
|
2773
2777
|
});
|
|
2774
2778
|
});
|
|
2775
|
-
}, [buildLivenessCheckPayload, submissionUrl, environment, idCardForFaceMatch, sessionId, sendBase64DocumentsInSwaggerProxy]);
|
|
2779
|
+
}, [buildLivenessCheckPayload, submissionUrl, environment, idCardForFaceMatch, sessionId, sendBase64DocumentsInSwaggerProxy, throwErrorsOnFailure]);
|
|
2776
2780
|
var retryLocationAccess = React.useCallback(function () {
|
|
2777
2781
|
setGeolocationAttempts(function (n) {
|
|
2778
2782
|
return n + 1;
|
|
@@ -23223,6 +23227,7 @@
|
|
|
23223
23227
|
className: classNames.signatureCanvas
|
|
23224
23228
|
};
|
|
23225
23229
|
}, [classNames.signatureCanvas, height, width]);
|
|
23230
|
+
var canSubmit = requestedAction === 'CAPTURE_SIGNATURE' && !isSignaturePadEmpty;
|
|
23226
23231
|
return /*#__PURE__*/React.createElement(Container$1, {
|
|
23227
23232
|
className: classNames.container
|
|
23228
23233
|
}, /*#__PURE__*/React.createElement(Inner$1, {
|
|
@@ -23246,27 +23251,26 @@
|
|
|
23246
23251
|
}, /*#__PURE__*/React.createElement(SignatureCanvas, {
|
|
23247
23252
|
ref: signaturePad,
|
|
23248
23253
|
canvasProps: canvasProps,
|
|
23249
|
-
|
|
23250
|
-
|
|
23251
|
-
setIsSignaturePadEmpty(!!((_a = signaturePad === null || signaturePad === void 0 ? void 0 : signaturePad.current) === null || _a === void 0 ? void 0 : _a.isEmpty()));
|
|
23254
|
+
onBegin: function onBegin() {
|
|
23255
|
+
return setIsSignaturePadEmpty(false);
|
|
23252
23256
|
}
|
|
23253
23257
|
})), /*#__PURE__*/React.createElement(SignatureButtonsContainer, {
|
|
23254
23258
|
className: classNames.signatureButtonsRow
|
|
23255
23259
|
}, /*#__PURE__*/React.createElement(LoaderButton, {
|
|
23256
23260
|
variant: "secondary",
|
|
23257
23261
|
className: classNames.clearSignatureBtn,
|
|
23262
|
+
disabled: !canSubmit,
|
|
23258
23263
|
onClick: function onClick() {
|
|
23259
|
-
var _a
|
|
23264
|
+
var _a;
|
|
23265
|
+
setIsSignaturePadEmpty(true);
|
|
23260
23266
|
(_a = signaturePad === null || signaturePad === void 0 ? void 0 : signaturePad.current) === null || _a === void 0 ? void 0 : _a.clear();
|
|
23261
|
-
setIsSignaturePadEmpty(!!((_b = signaturePad === null || signaturePad === void 0 ? void 0 : signaturePad.current) === null || _b === void 0 ? void 0 : _b.isEmpty()));
|
|
23262
23267
|
onClearSignaturePadClicked === null || onClearSignaturePadClicked === void 0 ? void 0 : onClearSignaturePadClicked();
|
|
23263
23268
|
},
|
|
23264
|
-
disabled: requestedAction === 'VERIFY_LIVENESS',
|
|
23265
23269
|
finished: true
|
|
23266
23270
|
}, verbiage.clearSignatureBtnText), /*#__PURE__*/React.createElement(AcceptBtn, {
|
|
23267
23271
|
variant: "positive",
|
|
23268
23272
|
className: classNames.acceptSignatureBtn,
|
|
23269
|
-
disabled:
|
|
23273
|
+
disabled: !canSubmit,
|
|
23270
23274
|
onClick: onAcceptClicked,
|
|
23271
23275
|
finished: true
|
|
23272
23276
|
}, verbiage.acceptSignatureBtnText))))));
|