idmission-web-sdk 2.1.16 → 2.1.17
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 +2 -0
- package/dist/components/id_capture/IdCaptureWizard.d.ts +2 -1
- package/dist/sdk2.esm.js +73 -69
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +73 -69
- 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
|
@@ -96,6 +96,8 @@ export interface IdValidationProps extends PropsWithChildren {
|
|
|
96
96
|
rotateLoadingOverlayImageWhenPortrait?: boolean;
|
|
97
97
|
/** Number of milliseconds indicating the maximum amount of time that should be spent trying to load the guided capture experience before giving up and resorting to the stock camera instead. Defaults to 45000 (45 seconds). */
|
|
98
98
|
modelLoadTimeoutMs?: number;
|
|
99
|
+
/** Boolean to indicate whether to force the fallback mode even if the ID capture models are available. Defaults to `false`. */
|
|
100
|
+
forceFallbackMode?: boolean;
|
|
99
101
|
/** Object to allow documents that have been previously captured to be submitted. Valid keys: `idCardFront`, `idCardBack`, `passport`.*/
|
|
100
102
|
precapturedDocuments?: CapturedDocuments;
|
|
101
103
|
/** Callback function that fires immediately prior to each document upload, giving the client application an opportunity to specify custom asynchronous logic that captures the document contents before it is exchanged for a document token. The document content and metadata are passed in as parameters and a promise resolving to void or false should be returned. If the returned promise resolves to false, the document will not be uploaded. */
|
|
@@ -63,10 +63,11 @@ export type IdCaptureWizardProps = {
|
|
|
63
63
|
portraitGuidesOnMobile?: boolean;
|
|
64
64
|
rotateLoadingOverlayImageWhenPortrait?: boolean;
|
|
65
65
|
silentFallback?: boolean;
|
|
66
|
+
forceFallbackMode?: boolean;
|
|
66
67
|
assets?: IdCaptureWizardAssets;
|
|
67
68
|
classNames?: IdCaptureWizardClassNames;
|
|
68
69
|
colors?: IdCaptureWizardColors;
|
|
69
70
|
verbiage?: IdCaptureWizardVerbiage;
|
|
70
71
|
debugMode?: boolean;
|
|
71
72
|
};
|
|
72
|
-
export declare const IdCaptureWizard: ({ onSuccess, onExitCapture, onUserCancel, loadingOverlayMode, precapturedDocuments, captureRequirement, separateIdCardCaptureSequence, thresholds, skipSuccessScreen, instructions, releaseCameraAccessOnExit, guideType, portraitGuidesOnMobile, rotateLoadingOverlayImageWhenPortrait, silentFallback, assets, classNames, colors, verbiage, debugMode, }: IdCaptureWizardProps) => ReactElement;
|
|
73
|
+
export declare const IdCaptureWizard: ({ onSuccess, onExitCapture, onUserCancel, loadingOverlayMode, precapturedDocuments, captureRequirement, separateIdCardCaptureSequence, thresholds, skipSuccessScreen, instructions, releaseCameraAccessOnExit, guideType, portraitGuidesOnMobile, rotateLoadingOverlayImageWhenPortrait, silentFallback, forceFallbackMode, assets, classNames, colors, verbiage, debugMode, }: IdCaptureWizardProps) => ReactElement;
|
package/dist/sdk2.esm.js
CHANGED
|
@@ -204,7 +204,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
204
204
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
205
205
|
};
|
|
206
206
|
|
|
207
|
-
var webSdkVersion = '2.1.
|
|
207
|
+
var webSdkVersion = '2.1.17';
|
|
208
208
|
|
|
209
209
|
function getPlatform() {
|
|
210
210
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -9522,40 +9522,42 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
|
|
|
9522
9522
|
rotateLoadingOverlayImageWhenPortrait = _1 === void 0 ? true : _1,
|
|
9523
9523
|
_2 = _a.silentFallback,
|
|
9524
9524
|
silentFallback = _2 === void 0 ? false : _2,
|
|
9525
|
-
_3 = _a.
|
|
9526
|
-
|
|
9527
|
-
_4 = _a.
|
|
9528
|
-
|
|
9529
|
-
_5 = _a.
|
|
9530
|
-
|
|
9531
|
-
_6 = _a.
|
|
9532
|
-
|
|
9533
|
-
_7 = _a.
|
|
9534
|
-
|
|
9535
|
-
|
|
9536
|
-
|
|
9537
|
-
|
|
9538
|
-
|
|
9539
|
-
|
|
9540
|
-
|
|
9541
|
-
|
|
9542
|
-
|
|
9543
|
-
|
|
9544
|
-
|
|
9545
|
-
|
|
9546
|
-
|
|
9547
|
-
|
|
9548
|
-
|
|
9549
|
-
|
|
9550
|
-
|
|
9551
|
-
|
|
9552
|
-
|
|
9553
|
-
|
|
9554
|
-
|
|
9555
|
-
|
|
9556
|
-
|
|
9557
|
-
|
|
9558
|
-
|
|
9525
|
+
_3 = _a.forceFallbackMode,
|
|
9526
|
+
forceFallbackMode = _3 === void 0 ? false : _3,
|
|
9527
|
+
_4 = _a.assets,
|
|
9528
|
+
assets = _4 === void 0 ? {} : _4,
|
|
9529
|
+
_5 = _a.classNames,
|
|
9530
|
+
classNames = _5 === void 0 ? {} : _5,
|
|
9531
|
+
_6 = _a.colors,
|
|
9532
|
+
colors = _6 === void 0 ? {} : _6,
|
|
9533
|
+
_7 = _a.verbiage,
|
|
9534
|
+
verbiage = _7 === void 0 ? {} : _7,
|
|
9535
|
+
_8 = _a.debugMode,
|
|
9536
|
+
debugMode = _8 === void 0 ? false : _8;
|
|
9537
|
+
var _9 = useIdCaptureState(),
|
|
9538
|
+
state = _9[0],
|
|
9539
|
+
dispatch = _9[1];
|
|
9540
|
+
var _10 = useContext(CameraStateContext),
|
|
9541
|
+
cameraAccessDenied = _10.cameraAccessDenied,
|
|
9542
|
+
requestCameraAccess = _10.requestCameraAccess,
|
|
9543
|
+
releaseCameraAccess = _10.releaseCameraAccess;
|
|
9544
|
+
var _11 = useState(false),
|
|
9545
|
+
overlayDismissed = _11[0],
|
|
9546
|
+
setOverlayDismissed = _11[1];
|
|
9547
|
+
var _12 = useContext(SubmissionContext),
|
|
9548
|
+
submissionStatus = _12.submissionStatus,
|
|
9549
|
+
setIdFrontImage = _12.setIdFrontImage,
|
|
9550
|
+
setIdBackImage = _12.setIdBackImage,
|
|
9551
|
+
setPassportImage = _12.setPassportImage,
|
|
9552
|
+
logIdFrontCaptureAttempt = _12.logIdFrontCaptureAttempt,
|
|
9553
|
+
logIdBackCaptureAttempt = _12.logIdBackCaptureAttempt;
|
|
9554
|
+
var _13 = useContext(IdCaptureModelsContext),
|
|
9555
|
+
start = _13.start,
|
|
9556
|
+
stop = _13.stop,
|
|
9557
|
+
onPredictionMade = _13.onPredictionMade,
|
|
9558
|
+
setRequiredDocumentType = _13.setRequiredDocumentType,
|
|
9559
|
+
modelError = _13.modelError,
|
|
9560
|
+
resetBestFrame = _13.resetBestFrame;
|
|
9559
9561
|
useEffect(function () {
|
|
9560
9562
|
dispatch({
|
|
9561
9563
|
type: 'configureWizard',
|
|
@@ -9644,9 +9646,9 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
|
|
|
9644
9646
|
type: 'resetWizard'
|
|
9645
9647
|
});
|
|
9646
9648
|
}, [dispatch]);
|
|
9647
|
-
var
|
|
9648
|
-
attempt =
|
|
9649
|
-
setAttempt =
|
|
9649
|
+
var _14 = useState(0),
|
|
9650
|
+
attempt = _14[0],
|
|
9651
|
+
setAttempt = _14[1];
|
|
9650
9652
|
var onExit = useCallback(function () {
|
|
9651
9653
|
releaseCameraAccess();
|
|
9652
9654
|
setOverlayDismissed(false);
|
|
@@ -9699,12 +9701,12 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
|
|
|
9699
9701
|
})
|
|
9700
9702
|
};
|
|
9701
9703
|
var theme = useTheme();
|
|
9702
|
-
var
|
|
9703
|
-
guideRectX =
|
|
9704
|
-
guideRectY =
|
|
9705
|
-
guideRectWidth =
|
|
9706
|
-
guideRectHeight =
|
|
9707
|
-
imageUrl =
|
|
9704
|
+
var _15 = useIdCaptureState()[0],
|
|
9705
|
+
guideRectX = _15.guideRectX,
|
|
9706
|
+
guideRectY = _15.guideRectY,
|
|
9707
|
+
guideRectWidth = _15.guideRectWidth,
|
|
9708
|
+
guideRectHeight = _15.guideRectHeight,
|
|
9709
|
+
imageUrl = _15.imageUrl;
|
|
9708
9710
|
var idCaptureAssets = assets[state.requestedDocumentType];
|
|
9709
9711
|
var idCaptureVerbiage = idCaptureVerbiages[state.requestedDocumentType];
|
|
9710
9712
|
useEffect(function () {
|
|
@@ -9758,8 +9760,7 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
|
|
|
9758
9760
|
});
|
|
9759
9761
|
});
|
|
9760
9762
|
}, [dispatch]);
|
|
9761
|
-
|
|
9762
|
-
if (modelError) {
|
|
9763
|
+
if (forceFallbackMode || modelError) {
|
|
9763
9764
|
return /*#__PURE__*/React__default.createElement(IdCaptureFallback, {
|
|
9764
9765
|
idCaptureRequirement: captureRequirement,
|
|
9765
9766
|
onFinished: onSubmitClick,
|
|
@@ -13939,6 +13940,8 @@ var IdValidation = function IdValidation(_a) {
|
|
|
13939
13940
|
rotateLoadingOverlayImageWhenPortrait = _k === void 0 ? true : _k,
|
|
13940
13941
|
_l = _a.modelLoadTimeoutMs,
|
|
13941
13942
|
modelLoadTimeoutMs = _l === void 0 ? defaultDocumentDetectionModelLoadTimeoutMs : _l,
|
|
13943
|
+
_m = _a.forceFallbackMode,
|
|
13944
|
+
forceFallbackMode = _m === void 0 ? false : _m,
|
|
13942
13945
|
onBeforeSubmit = _a.onBeforeSubmit,
|
|
13943
13946
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
13944
13947
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
@@ -13952,28 +13955,28 @@ var IdValidation = function IdValidation(_a) {
|
|
|
13952
13955
|
onUserCancel = _a.onUserCancel,
|
|
13953
13956
|
onModelError = _a.onModelError,
|
|
13954
13957
|
onCameraAccessDenied = _a.onCameraAccessDenied,
|
|
13955
|
-
|
|
13956
|
-
theme =
|
|
13957
|
-
|
|
13958
|
-
assets =
|
|
13959
|
-
|
|
13960
|
-
classNames =
|
|
13961
|
-
|
|
13962
|
-
colors =
|
|
13963
|
-
|
|
13964
|
-
verbiage =
|
|
13965
|
-
|
|
13966
|
-
captureSignature =
|
|
13967
|
-
|
|
13968
|
-
captureSignatureVideo =
|
|
13969
|
-
|
|
13970
|
-
captureAdditionalDocuments =
|
|
13971
|
-
|
|
13972
|
-
geolocationEnabled =
|
|
13973
|
-
|
|
13974
|
-
geolocationRequired =
|
|
13975
|
-
|
|
13976
|
-
debugMode =
|
|
13958
|
+
_o = _a.theme,
|
|
13959
|
+
theme = _o === void 0 ? 'default' : _o,
|
|
13960
|
+
_p = _a.assets,
|
|
13961
|
+
assets = _p === void 0 ? {} : _p,
|
|
13962
|
+
_q = _a.classNames,
|
|
13963
|
+
classNames = _q === void 0 ? {} : _q,
|
|
13964
|
+
_r = _a.colors,
|
|
13965
|
+
colors = _r === void 0 ? {} : _r,
|
|
13966
|
+
_s = _a.verbiage,
|
|
13967
|
+
verbiage = _s === void 0 ? {} : _s,
|
|
13968
|
+
_t = _a.captureSignature,
|
|
13969
|
+
captureSignature = _t === void 0 ? false : _t,
|
|
13970
|
+
_u = _a.captureSignatureVideo,
|
|
13971
|
+
captureSignatureVideo = _u === void 0 ? false : _u,
|
|
13972
|
+
_v = _a.captureAdditionalDocuments,
|
|
13973
|
+
captureAdditionalDocuments = _v === void 0 ? [] : _v,
|
|
13974
|
+
_w = _a.geolocationEnabled,
|
|
13975
|
+
geolocationEnabled = _w === void 0 ? true : _w,
|
|
13976
|
+
_x = _a.geolocationRequired,
|
|
13977
|
+
geolocationRequired = _x === void 0 ? false : _x,
|
|
13978
|
+
_y = _a.debugMode,
|
|
13979
|
+
debugMode = _y === void 0 ? false : _y;
|
|
13977
13980
|
useLanguage(lang);
|
|
13978
13981
|
useDebugLogging(debugMode);
|
|
13979
13982
|
var idCaptureProps = useMemo(function () {
|
|
@@ -13987,6 +13990,7 @@ var IdValidation = function IdValidation(_a) {
|
|
|
13987
13990
|
thresholds: idCaptureThresholds,
|
|
13988
13991
|
skipSuccessScreen: skipSuccessScreen,
|
|
13989
13992
|
loadingOverlayMode: loadingOverlayMode,
|
|
13993
|
+
forceFallbackMode: forceFallbackMode,
|
|
13990
13994
|
instructions: instructions,
|
|
13991
13995
|
guideType: guideType,
|
|
13992
13996
|
portraitGuidesOnMobile: portraitGuidesOnMobile,
|
|
@@ -13998,7 +14002,7 @@ var IdValidation = function IdValidation(_a) {
|
|
|
13998
14002
|
verbiage: verbiage,
|
|
13999
14003
|
debugMode: debugMode
|
|
14000
14004
|
};
|
|
14001
|
-
}, [onExitCapture, onUserCancel, onModelError, precapturedDocuments, idCaptureRequirement, separateIdCardCaptureSequence, idCaptureThresholds, skipSuccessScreen, loadingOverlayMode, instructions, guideType, portraitGuidesOnMobile, rotateLoadingOverlayImageWhenPortrait, modelLoadTimeoutMs, assets, classNames, colors, verbiage, debugMode]);
|
|
14005
|
+
}, [onExitCapture, onUserCancel, onModelError, precapturedDocuments, idCaptureRequirement, separateIdCardCaptureSequence, idCaptureThresholds, skipSuccessScreen, loadingOverlayMode, forceFallbackMode, instructions, guideType, portraitGuidesOnMobile, rotateLoadingOverlayImageWhenPortrait, modelLoadTimeoutMs, assets, classNames, colors, verbiage, debugMode]);
|
|
14002
14006
|
var additionalDocumentCaptureProps = useMemo(function () {
|
|
14003
14007
|
return {
|
|
14004
14008
|
documents: captureAdditionalDocuments,
|