idmission-web-sdk 2.1.77 → 2.1.79
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/IdValidation.d.ts +1 -1
- package/dist/components/customer_flows/SignatureKYC.d.ts +1 -1
- package/dist/components/customer_flows/VideoIdValidation.d.ts +1 -1
- package/dist/components/face_liveness/FaceLivenessWizard.d.ts +1 -1
- package/dist/components/id_capture/IdCaptureLoadingOverlay.d.ts +1 -1
- package/dist/components/id_capture/IdCaptureWizard.d.ts +1 -1
- package/dist/components/selfie_capture/SelfieCaptureLoadingOverlay.d.ts +1 -1
- package/dist/components/video_id/IdVideoCaptureWizard.d.ts +1 -1
- package/dist/components/video_signature_capture/VideoSignatureWizard.d.ts +1 -1
- package/dist/lib/models/Focus.d.ts +3 -0
- package/dist/sdk2.cjs.development.js +17 -14
- 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 +17 -14
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +17 -14
- 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
|
@@ -80,7 +80,7 @@ export interface IdValidationProps extends PropsWithChildren {
|
|
|
80
80
|
/** String indicating which ID capture loading overlay screen should be used. Supported values: 'default' and 'legacy'. Defaults to 'default'. */
|
|
81
81
|
loadingOverlayMode?: IdCaptureLoadingOverlayMode;
|
|
82
82
|
/** React component to render if the warmup overlay needs to be completely replaced. Note that 100px padding should be applied to the bottom as the loading progress will be displayed over this content. **/
|
|
83
|
-
customOverlayContent?:
|
|
83
|
+
customOverlayContent?: ReactNode;
|
|
84
84
|
/** String to indicate which types of documents should be captured. Valid values: `idCard`, `passport`, `idCardOrPassport`, `idCardAndPassport`. Default is `idCardOrPassport`. */
|
|
85
85
|
idCaptureRequirement?: IdCaptureRequirementOption;
|
|
86
86
|
/** Boolean to indicate whether the success screen should be shown in after the ID card front is captured, rather than the flip animation. Defaults to `false`. */
|
|
@@ -45,7 +45,7 @@ export interface SignatureKYCProps extends PropsWithChildren {
|
|
|
45
45
|
/** String indicating which loading overlay screen should be used. Supported values: 'default' and 'legacy'. Defaults to 'default'. */
|
|
46
46
|
loadingOverlayMode?: SelfieCaptureLoadingOverlayMode;
|
|
47
47
|
/** React component to render if the warmup overlay needs to be completely replaced. Note that 100px padding should be applied to the bottom as the loading progress will be displayed over this content. **/
|
|
48
|
-
customOverlayContent?:
|
|
48
|
+
customOverlayContent?: ReactNode;
|
|
49
49
|
/** Boolean or async function to indicate whether to proceed automatically after capture guidance is satisfied. If an async function is supplied returning a boolean, it will be evaluated at the time of capture guidance satisfaction. Defaults to `false`. */
|
|
50
50
|
skipSuccessScreen?: boolean | (() => Promise<boolean>);
|
|
51
51
|
/** String containing a base64 image or document service ID pointing to an ID card front image that should be used to match the user's face against. Leave blank to disable face matching. */
|
|
@@ -131,7 +131,7 @@ export interface VideoIdValidationProps extends PropsWithChildren {
|
|
|
131
131
|
/** Boolean or async function to indicate whether to instruct the user to show the back of their ID card during video capture. If an async function is supplied returning a boolean, it will be evaluated at the time of ID front video capture completion. Defaults to `false`. */
|
|
132
132
|
skipShowIdCardBack?: boolean | (() => Promise<boolean>);
|
|
133
133
|
/** React component to render if the warmup overlay needs to be completely replaced. Note that 100px padding should be applied to the bottom as the loading progress will be displayed over this content. **/
|
|
134
|
-
customOverlayContent?:
|
|
134
|
+
customOverlayContent?: ReactNode;
|
|
135
135
|
/** String indicating which ID capture loading overlay screen should be used. Supported values: 'default' and 'legacy'. Defaults to 'default'. */
|
|
136
136
|
idCaptureLoadingOverlayMode?: IdCaptureLoadingOverlayMode;
|
|
137
137
|
/** String to indicate what type of guides to use during capture. Using `fit` is highly recommended in order to capture the best quality image. Valid values: `fit`, `overlay`. Defaults to `fit`. */
|
|
@@ -35,7 +35,7 @@ export type FaceLivenessWizardProps = {
|
|
|
35
35
|
onModelError?: (error: Error) => void;
|
|
36
36
|
onCustomOverlayDismissed?: () => void;
|
|
37
37
|
loadingOverlayMode?: SelfieCaptureLoadingOverlayMode;
|
|
38
|
-
customOverlayContent?:
|
|
38
|
+
customOverlayContent?: ReactNode;
|
|
39
39
|
timeoutDurationMs?: number;
|
|
40
40
|
modelLoadTimeoutMs?: number;
|
|
41
41
|
maxRetries?: number;
|
|
@@ -54,7 +54,7 @@ export type IdCaptureLoadingOverlayProps = {
|
|
|
54
54
|
classNames?: IdCaptureLoadingOverlayClassNames;
|
|
55
55
|
colors?: IdCaptureLoadingOverlayColors;
|
|
56
56
|
verbiage?: IdCaptureLoadingOverlayVerbiage;
|
|
57
|
-
customOverlayContent?:
|
|
57
|
+
customOverlayContent?: ReactNode;
|
|
58
58
|
};
|
|
59
59
|
export type IdCaptureLoadingOverlayMode = 'default' | 'legacy';
|
|
60
60
|
export declare const IdCaptureLoadingOverlay: ({ mode, ...props }: IdCaptureLoadingOverlayProps & {
|
|
@@ -49,7 +49,7 @@ export type IdCaptureWizardProps = {
|
|
|
49
49
|
onModelError?: (error: Error) => void;
|
|
50
50
|
onCustomOverlayDismissed?: () => void;
|
|
51
51
|
loadingOverlayMode?: IdCaptureLoadingOverlayMode;
|
|
52
|
-
customOverlayContent?:
|
|
52
|
+
customOverlayContent?: ReactNode;
|
|
53
53
|
modelLoadTimeoutMs?: number;
|
|
54
54
|
precapturedDocuments?: CapturedDocuments;
|
|
55
55
|
captureRequirement?: IdCaptureRequirementOption;
|
|
@@ -55,7 +55,7 @@ export type SelfieCaptureLoadingOverlayProps = {
|
|
|
55
55
|
classNames?: SelfieCaptureLoadingOverlayClassNames;
|
|
56
56
|
colors?: SelfieCaptureLoadingOverlayColors;
|
|
57
57
|
verbiage?: SelfieCaptureLoadingOverlayVerbiage;
|
|
58
|
-
customOverlayContent?:
|
|
58
|
+
customOverlayContent?: ReactNode;
|
|
59
59
|
};
|
|
60
60
|
export type SelfieCaptureLoadingOverlayMode = 'default' | 'legacy';
|
|
61
61
|
export declare const SelfieCaptureLoadingOverlay: ({ mode, ...props }: SelfieCaptureLoadingOverlayProps & {
|
|
@@ -53,7 +53,7 @@ export type VideoIdWizardProps = {
|
|
|
53
53
|
skipIdCapture?: boolean;
|
|
54
54
|
skipShowIdCardBack?: boolean | (() => Promise<boolean>);
|
|
55
55
|
idCaptureLoadingOverlayMode?: IdCaptureLoadingOverlayMode;
|
|
56
|
-
customOverlayContent?:
|
|
56
|
+
customOverlayContent?: ReactNode;
|
|
57
57
|
idCaptureGuideType?: IdCaptureGuideType;
|
|
58
58
|
idCaptureGuideImages?: IdCaptureGuideImages;
|
|
59
59
|
idCapturePortraitGuidesOnMobile?: boolean;
|
|
@@ -32,7 +32,7 @@ export type VideoSignatureWizardProps = {
|
|
|
32
32
|
onModelError?: (error: Error) => void;
|
|
33
33
|
onCustomOverlayDismissed?: () => void;
|
|
34
34
|
loadingOverlayMode?: SelfieCaptureLoadingOverlayMode;
|
|
35
|
-
customOverlayContent?:
|
|
35
|
+
customOverlayContent?: ReactNode;
|
|
36
36
|
modelLoadTimeoutMs?: number;
|
|
37
37
|
skipSuccessScreen?: boolean | (() => Promise<boolean>);
|
|
38
38
|
assets?: VideoSignatureAssets;
|
|
@@ -33,4 +33,7 @@ export declare function useLoadFocusModel({ modelPath, modelLoadTimeoutMs, onMod
|
|
|
33
33
|
modelDownloadProgress: number;
|
|
34
34
|
modelError: Error | null;
|
|
35
35
|
};
|
|
36
|
+
export declare let lastFocusPredictionAt: number;
|
|
37
|
+
export declare let lastFocusPredictionTime: number;
|
|
38
|
+
export declare function setLastFocusPredictionAt(time: number): void;
|
|
36
39
|
export declare function makeFocusModelPrediction(model: ImageClassifier, imageData: Frame, cropCanvas: HTMLCanvasElement, rotateCanvas: HTMLCanvasElement, box?: DetectedObjectBox): FocusPrediction;
|
|
@@ -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.79';
|
|
238
238
|
|
|
239
239
|
function getPlatform() {
|
|
240
240
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -2872,6 +2872,12 @@ function useLoadFocusModel(_a) {
|
|
|
2872
2872
|
modelError: modelError
|
|
2873
2873
|
};
|
|
2874
2874
|
}
|
|
2875
|
+
var lastFocusPredictionAt = 0;
|
|
2876
|
+
var lastFocusPredictionTime = 0;
|
|
2877
|
+
function setLastFocusPredictionAt(time) {
|
|
2878
|
+
lastFocusPredictionTime = time - lastFocusPredictionAt;
|
|
2879
|
+
lastFocusPredictionAt = time;
|
|
2880
|
+
}
|
|
2875
2881
|
function makeFocusModelPrediction(model, imageData, cropCanvas, rotateCanvas, box) {
|
|
2876
2882
|
var _a, _b, _c, _d, _e;
|
|
2877
2883
|
var startedAt = new Date();
|
|
@@ -5984,22 +5990,19 @@ function FocusModelProvider(_a) {
|
|
|
5984
5990
|
var _e = React.useState({}),
|
|
5985
5991
|
focusThresholds = _e[0],
|
|
5986
5992
|
setFocusThresholds = _e[1];
|
|
5987
|
-
var _f =
|
|
5988
|
-
focusPredictionTime = _f[0],
|
|
5989
|
-
setFocusPredictionTime = _f[1];
|
|
5990
|
-
var _g = useLoadFocusModel({
|
|
5993
|
+
var _f = useLoadFocusModel({
|
|
5991
5994
|
modelPath: focusModelPath,
|
|
5992
5995
|
modelLoadTimeoutMs: focusModelLoadTimeoutMs,
|
|
5993
5996
|
onModelError: onFocusModelError
|
|
5994
5997
|
}),
|
|
5995
|
-
model =
|
|
5996
|
-
ready =
|
|
5997
|
-
modelDownloadProgress =
|
|
5998
|
-
modelError =
|
|
5998
|
+
model = _f.model,
|
|
5999
|
+
ready = _f.ready,
|
|
6000
|
+
modelDownloadProgress = _f.modelDownloadProgress,
|
|
6001
|
+
modelError = _f.modelError;
|
|
5999
6002
|
var makeFocusPrediction = React.useCallback(function (imageData, box) {
|
|
6000
6003
|
if (!model.current) return null;
|
|
6001
6004
|
var prediction = makeFocusModelPrediction(model.current, imageData, cropCanvas.current, rotateCanvas.current, box);
|
|
6002
|
-
|
|
6005
|
+
setLastFocusPredictionAt(prediction.predictionTime);
|
|
6003
6006
|
return prediction;
|
|
6004
6007
|
}, [model]);
|
|
6005
6008
|
var value = React.useMemo(function () {
|
|
@@ -6008,11 +6011,11 @@ function FocusModelProvider(_a) {
|
|
|
6008
6011
|
focusModelDownloadProgress: modelDownloadProgress,
|
|
6009
6012
|
focusModelError: modelError,
|
|
6010
6013
|
makeFocusPrediction: makeFocusPrediction,
|
|
6011
|
-
focusPredictionTime:
|
|
6014
|
+
focusPredictionTime: lastFocusPredictionTime,
|
|
6012
6015
|
focusThresholds: focusThresholds,
|
|
6013
6016
|
setFocusThresholds: setFocusThresholds
|
|
6014
6017
|
};
|
|
6015
|
-
}, [
|
|
6018
|
+
}, [focusThresholds, makeFocusPrediction, modelDownloadProgress, modelError, ready]);
|
|
6016
6019
|
return /*#__PURE__*/React__namespace.default.createElement(FocusModelContext.Provider, {
|
|
6017
6020
|
value: value
|
|
6018
6021
|
}, /*#__PURE__*/React__namespace.default.createElement(InvisibleCanvas, {
|
|
@@ -7915,7 +7918,7 @@ var IdCaptureLoadingOverlayDefault = function IdCaptureLoadingOverlayDefault(_a)
|
|
|
7915
7918
|
}, onUserCancel && ( /*#__PURE__*/React__namespace.default.createElement(ExitCaptureButton, {
|
|
7916
7919
|
onClick: onUserCancel,
|
|
7917
7920
|
className: classNames.cancelBtn
|
|
7918
|
-
})), customOverlayContent
|
|
7921
|
+
})), customOverlayContent || ( /*#__PURE__*/React__namespace.default.createElement(React__namespace.default.Fragment, null, /*#__PURE__*/React__namespace.default.createElement(OverlayHeader$1, null, /*#__PURE__*/React__namespace.default.createElement(StyledGuidanceMessage$2, {
|
|
7919
7922
|
className: classNames.heading
|
|
7920
7923
|
}, verbiage.headingText)), /*#__PURE__*/React__namespace.default.createElement(StyledOverlayImageContainer$2, {
|
|
7921
7924
|
className: classNames.imageContainer,
|
|
@@ -12282,7 +12285,7 @@ var SelfieCaptureLoadingOverlayDefault = function SelfieCaptureLoadingOverlayDef
|
|
|
12282
12285
|
}, onUserCancel && ( /*#__PURE__*/React__namespace.default.createElement(ExitCaptureButton, {
|
|
12283
12286
|
onClick: onUserCancel,
|
|
12284
12287
|
className: classNames.cancelBtn
|
|
12285
|
-
})), customOverlayContent
|
|
12288
|
+
})), customOverlayContent || ( /*#__PURE__*/React__namespace.default.createElement(React__namespace.default.Fragment, null, /*#__PURE__*/React__namespace.default.createElement(OverlayHeader, {
|
|
12286
12289
|
className: classNames.headingContainer
|
|
12287
12290
|
}, /*#__PURE__*/React__namespace.default.createElement(StyledGuidanceMessage, {
|
|
12288
12291
|
className: classNames.heading
|