idmission-web-sdk 1.0.344 → 1.0.345
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/face_liveness/FaceLivenessCapture.d.ts +1 -1
- package/dist/components/fallback_flows/SelfieCapture.d.ts +2 -2
- package/dist/sdk2.cjs.development.js +23 -11
- 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 +23 -11
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +23 -11
- 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/stories/CustomerFlows/VideoIdValidation.stories.d.ts +1 -0
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@ import { ReactElement } from 'react';
|
|
|
2
2
|
import { SelfieCaptureClassNames, SelfieCaptureColors, SelfieCaptureVerbiage } from '../selfie_capture/SelfieCapture';
|
|
3
3
|
import { SelfieProgressPreviewClassNames } from '../common/SelfieProgressPreview';
|
|
4
4
|
import { CustomerSuppliedVerbiage } from '../../lib/locales';
|
|
5
|
-
import { SelfieCaptureLoadingOverlayProps } from
|
|
5
|
+
import { SelfieCaptureLoadingOverlayProps } from '../selfie_capture/SelfieCaptureLoadingOverlay';
|
|
6
6
|
export type FaceLivenessCaptureClassNames = SelfieCaptureClassNames & {
|
|
7
7
|
imagePreview?: SelfieProgressPreviewClassNames;
|
|
8
8
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
2
|
import { CustomerSuppliedVerbiage } from '../../lib/locales';
|
|
3
3
|
import { LoaderButtonColors } from '../common/LoaderButton';
|
|
4
|
-
import { SelfieCaptureLoadingOverlayProps } from
|
|
4
|
+
import { SelfieCaptureLoadingOverlayProps } from '../selfie_capture/SelfieCaptureLoadingOverlay';
|
|
5
5
|
export type SelfieCaptureFallbackClassNames = {
|
|
6
6
|
container?: string;
|
|
7
7
|
inner?: string;
|
|
@@ -33,4 +33,4 @@ export type SelfieCaptureFallbackProps = {
|
|
|
33
33
|
silentFallback?: boolean;
|
|
34
34
|
selfieCaptureLoadingOverlayProps?: SelfieCaptureLoadingOverlayProps;
|
|
35
35
|
};
|
|
36
|
-
export declare const SelfieCaptureFallback: ({ onFinished, onCapture, classNames, colors, verbiage: rawVerbiage, silentFallback, selfieCaptureLoadingOverlayProps: overlayProps }: SelfieCaptureFallbackProps) => ReactElement;
|
|
36
|
+
export declare const SelfieCaptureFallback: ({ onFinished, onCapture, classNames, colors, verbiage: rawVerbiage, silentFallback, selfieCaptureLoadingOverlayProps: overlayProps, }: SelfieCaptureFallbackProps) => ReactElement;
|
|
@@ -50,7 +50,7 @@ var LanguageDetector__default = /*#__PURE__*/_interopDefaultLegacy(LanguageDetec
|
|
|
50
50
|
var i18n__default = /*#__PURE__*/_interopDefaultLegacy(i18n);
|
|
51
51
|
var SignatureCanvas__default = /*#__PURE__*/_interopDefaultLegacy(SignatureCanvas);
|
|
52
52
|
|
|
53
|
-
var webSdkVersion = '1.0.
|
|
53
|
+
var webSdkVersion = '1.0.345';
|
|
54
54
|
|
|
55
55
|
function getPlatform() {
|
|
56
56
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -14214,6 +14214,7 @@ var SelfieCaptureFallback = function SelfieCaptureFallback(_a) {
|
|
|
14214
14214
|
}
|
|
14215
14215
|
});
|
|
14216
14216
|
}
|
|
14217
|
+
// todo: we might be able to use the media stream instead if we clone it - as it stands today, we hae to use the camera to support iOS 16 devices
|
|
14217
14218
|
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement("input", {
|
|
14218
14219
|
ref: fileInput,
|
|
14219
14220
|
type: "file",
|
|
@@ -14530,6 +14531,9 @@ var initialState$2 = {
|
|
|
14530
14531
|
phoneDetected: false,
|
|
14531
14532
|
timesLivenessCheckFailed: 0
|
|
14532
14533
|
};
|
|
14534
|
+
/** todo: this feels like it should be hoisted up to the wizard because these states of failed and error dovetail into those in the wizard.
|
|
14535
|
+
* There may also be some crossing of wires in how error/failed are used.
|
|
14536
|
+
*/
|
|
14533
14537
|
var reducer$2 = function reducer(state, action) {
|
|
14534
14538
|
var _a, _b;
|
|
14535
14539
|
switch (action.type) {
|
|
@@ -14693,21 +14697,28 @@ var FaceLivenessCapture = function FaceLivenessCapture(_a) {
|
|
|
14693
14697
|
var onFallbackImageCaptured = React.useCallback(function (imageUrl) {
|
|
14694
14698
|
return tslib.__awaiter(void 0, void 0, void 0, function () {
|
|
14695
14699
|
var imageData, response, e_2;
|
|
14696
|
-
|
|
14697
|
-
|
|
14700
|
+
var _a;
|
|
14701
|
+
return tslib.__generator(this, function (_b) {
|
|
14702
|
+
switch (_b.label) {
|
|
14698
14703
|
case 0:
|
|
14699
14704
|
dispatch({
|
|
14700
14705
|
type: 'livenessChecking'
|
|
14701
14706
|
});
|
|
14702
|
-
|
|
14707
|
+
_b.label = 1;
|
|
14703
14708
|
case 1:
|
|
14704
|
-
|
|
14709
|
+
_b.trys.push([1, 4,, 5]);
|
|
14705
14710
|
return [4 /*yield*/, dataUrlToBase64(imageUrl)];
|
|
14706
14711
|
case 2:
|
|
14707
|
-
imageData =
|
|
14708
|
-
return [4 /*yield*/, checkLiveness(imageData)
|
|
14712
|
+
imageData = _b.sent();
|
|
14713
|
+
return [4 /*yield*/, checkLiveness(imageData)
|
|
14714
|
+
// todo: this feels dirty and is the reason for the todo around line 83 - but is necessary to handle fallback liveness validation
|
|
14715
|
+
];
|
|
14709
14716
|
case 3:
|
|
14710
|
-
response =
|
|
14717
|
+
response = _b.sent();
|
|
14718
|
+
// todo: this feels dirty and is the reason for the todo around line 83 - but is necessary to handle fallback liveness validation
|
|
14719
|
+
if (((_a = response === null || response === void 0 ? void 0 : response.resultData) === null || _a === void 0 ? void 0 : _a.verificationResult) !== 'Live Face Detected') {
|
|
14720
|
+
onTimeout === null || onTimeout === void 0 ? void 0 : onTimeout();
|
|
14721
|
+
}
|
|
14711
14722
|
dispatch({
|
|
14712
14723
|
type: 'livenessChecked',
|
|
14713
14724
|
payload: {
|
|
@@ -14717,7 +14728,7 @@ var FaceLivenessCapture = function FaceLivenessCapture(_a) {
|
|
|
14717
14728
|
});
|
|
14718
14729
|
return [3 /*break*/, 5];
|
|
14719
14730
|
case 4:
|
|
14720
|
-
e_2 =
|
|
14731
|
+
e_2 = _b.sent();
|
|
14721
14732
|
dispatch({
|
|
14722
14733
|
type: 'livenessCheckFailed',
|
|
14723
14734
|
payload: {
|
|
@@ -14966,7 +14977,8 @@ var FaceLivenessWizard = function FaceLivenessWizard(_a) {
|
|
|
14966
14977
|
});
|
|
14967
14978
|
});
|
|
14968
14979
|
}, [onSuccess, setSelfieImage, livenessCheckRequest, submissionResponse]);
|
|
14969
|
-
|
|
14980
|
+
// todo: how this is being used, it would make sense to rename the prop as well, but that would be a breaking change - discuss
|
|
14981
|
+
var onFailureOrTimeout = React.useCallback(function () {
|
|
14970
14982
|
setCaptureState('FAILED');
|
|
14971
14983
|
onTimeout === null || onTimeout === void 0 ? void 0 : onTimeout(submissionResponse, livenessCheckRequest);
|
|
14972
14984
|
}, [onTimeout, livenessCheckRequest, submissionResponse]);
|
|
@@ -15011,7 +15023,7 @@ var FaceLivenessWizard = function FaceLivenessWizard(_a) {
|
|
|
15011
15023
|
key: "capture".concat(attempt),
|
|
15012
15024
|
onCapture: onCapture,
|
|
15013
15025
|
onSuccess: onSuccessCallback,
|
|
15014
|
-
onTimeout:
|
|
15026
|
+
onTimeout: onFailureOrTimeout,
|
|
15015
15027
|
onExit: onExitCallback,
|
|
15016
15028
|
timeoutDurationMs: timeoutDurationMs,
|
|
15017
15029
|
silentFallback: silentFallback,
|