idmission-web-sdk 1.0.141 → 1.0.142
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/index.d.ts +2 -2
- package/dist/sdk2.cjs.development.js +72 -72
- 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 -72
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +72 -72
- 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
package/dist/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import { SignatureKYC, SignatureKYCProps } from './components/customer_flows/Sig
|
|
|
8
8
|
import { VideoIdValidation, VideoIdValidationProps } from './components/customer_flows/VideoIdValidation';
|
|
9
9
|
import { preloadModels } from './lib/models/preloadModels';
|
|
10
10
|
import { CustomerBiometricsEnrollment } from './components/customer_flows/CustomerBiometricsEnrollment';
|
|
11
|
-
import { themes } from './themes';
|
|
11
|
+
import { Theme, themes } from './themes';
|
|
12
12
|
import { SubmissionRequest, SubmissionResponse } from './contexts/SubmissionContext';
|
|
13
13
|
import { DocumentCapture, DocumentCaptureProps } from './components/customer_flows/DocumentCapture';
|
|
14
14
|
import { CapturedDocumentImg } from './components/common/CapturedDocumentImg';
|
|
@@ -42,4 +42,4 @@ export type IDmissionSDK = {
|
|
|
42
42
|
declare global {
|
|
43
43
|
var IDmissionSDK: IDmissionSDK;
|
|
44
44
|
}
|
|
45
|
-
export { preloadModels, themes, IdValidation, FaceValidation, IdAndFaceValidation, CustomerIdAndBiometricsEnrollment, CustomerBiometricsEnrollment, CustomerVerification, CustomerIdentification, SignatureKYC, VideoIdValidation, DocumentCapture, SubmissionRequest, SubmissionResponse, CapturedDocumentImg, };
|
|
45
|
+
export { preloadModels, themes, Theme, IdValidation, FaceValidation, IdAndFaceValidation, CustomerIdAndBiometricsEnrollment, CustomerBiometricsEnrollment, CustomerVerification, CustomerIdentification, SignatureKYC, VideoIdValidation, DocumentCapture, SubmissionRequest, SubmissionResponse, CapturedDocumentImg, };
|
|
@@ -47,7 +47,7 @@ var LanguageDetector__default = /*#__PURE__*/_interopDefaultLegacy(LanguageDetec
|
|
|
47
47
|
var i18n__default = /*#__PURE__*/_interopDefaultLegacy(i18n);
|
|
48
48
|
var SignatureCanvas__default = /*#__PURE__*/_interopDefaultLegacy(SignatureCanvas);
|
|
49
49
|
|
|
50
|
-
var webSdkVersion = '1.0.
|
|
50
|
+
var webSdkVersion = '1.0.142';
|
|
51
51
|
|
|
52
52
|
function getPlatform() {
|
|
53
53
|
if (typeof window === 'undefined') return;
|
|
@@ -11204,63 +11204,63 @@ var reducer$4 = function reducer(state, action) {
|
|
|
11204
11204
|
}
|
|
11205
11205
|
};
|
|
11206
11206
|
var IdCaptureWizard = function IdCaptureWizard(_a) {
|
|
11207
|
-
var _b;
|
|
11208
|
-
var
|
|
11207
|
+
var _b, _c, _d;
|
|
11208
|
+
var _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
11209
11209
|
var onSuccess = _a.onSuccess,
|
|
11210
11210
|
onExitCapture = _a.onExitCapture,
|
|
11211
11211
|
onUserCancel = _a.onUserCancel,
|
|
11212
11212
|
precapturedDocuments = _a.precapturedDocuments,
|
|
11213
|
-
|
|
11214
|
-
captureRequirement =
|
|
11215
|
-
|
|
11216
|
-
autoCaptureEnabled =
|
|
11217
|
-
|
|
11218
|
-
autoCaptureGoodFramesRequired =
|
|
11219
|
-
|
|
11220
|
-
autoCaptureBarcodeRequired =
|
|
11221
|
-
|
|
11222
|
-
barcodeScanningEnabled =
|
|
11223
|
-
|
|
11224
|
-
idCardAutoCaptureScoreThreshold =
|
|
11225
|
-
|
|
11226
|
-
passportAutoCaptureScoreThreshold =
|
|
11227
|
-
|
|
11228
|
-
mrzDetectionScoreThreshold =
|
|
11229
|
-
|
|
11230
|
-
idCardFocusScoreThreshold =
|
|
11231
|
-
|
|
11232
|
-
passportFocusScoreThreshold =
|
|
11233
|
-
|
|
11234
|
-
skipSuccessScreen =
|
|
11213
|
+
_q = _a.captureRequirement,
|
|
11214
|
+
captureRequirement = _q === void 0 ? 'idCardOrPassport' : _q,
|
|
11215
|
+
_r = _a.autoCaptureEnabled,
|
|
11216
|
+
autoCaptureEnabled = _r === void 0 ? true : _r,
|
|
11217
|
+
_s = _a.autoCaptureGoodFramesRequired,
|
|
11218
|
+
autoCaptureGoodFramesRequired = _s === void 0 ? 3 : _s,
|
|
11219
|
+
_t = _a.autoCaptureBarcodeRequired,
|
|
11220
|
+
autoCaptureBarcodeRequired = _t === void 0 ? 'mobile' : _t,
|
|
11221
|
+
_u = _a.barcodeScanningEnabled,
|
|
11222
|
+
barcodeScanningEnabled = _u === void 0 ? false : _u,
|
|
11223
|
+
_v = _a.idCardAutoCaptureScoreThreshold,
|
|
11224
|
+
idCardAutoCaptureScoreThreshold = _v === void 0 ? 0.8 : _v,
|
|
11225
|
+
_w = _a.passportAutoCaptureScoreThreshold,
|
|
11226
|
+
passportAutoCaptureScoreThreshold = _w === void 0 ? 0.75 : _w,
|
|
11227
|
+
_x = _a.mrzDetectionScoreThreshold,
|
|
11228
|
+
mrzDetectionScoreThreshold = _x === void 0 ? 0.25 : _x,
|
|
11229
|
+
_y = _a.idCardFocusScoreThreshold,
|
|
11230
|
+
idCardFocusScoreThreshold = _y === void 0 ? 0.3 : _y,
|
|
11231
|
+
_z = _a.passportFocusScoreThreshold,
|
|
11232
|
+
passportFocusScoreThreshold = _z === void 0 ? 0.3 : _z,
|
|
11233
|
+
_0 = _a.skipSuccessScreen,
|
|
11234
|
+
skipSuccessScreen = _0 === void 0 ? false : _0,
|
|
11235
11235
|
instructions = _a.instructions,
|
|
11236
|
-
|
|
11237
|
-
releaseCameraAccessOnExit =
|
|
11238
|
-
|
|
11239
|
-
guideType =
|
|
11240
|
-
|
|
11241
|
-
assets =
|
|
11242
|
-
|
|
11243
|
-
classNames =
|
|
11244
|
-
|
|
11245
|
-
colors =
|
|
11246
|
-
|
|
11247
|
-
verbiage =
|
|
11248
|
-
|
|
11249
|
-
debugMode =
|
|
11250
|
-
var
|
|
11251
|
-
state =
|
|
11252
|
-
dispatch =
|
|
11236
|
+
_1 = _a.releaseCameraAccessOnExit,
|
|
11237
|
+
releaseCameraAccessOnExit = _1 === void 0 ? true : _1,
|
|
11238
|
+
_2 = _a.guideType,
|
|
11239
|
+
guideType = _2 === void 0 ? 'fit' : _2,
|
|
11240
|
+
_3 = _a.assets,
|
|
11241
|
+
assets = _3 === void 0 ? {} : _3,
|
|
11242
|
+
_4 = _a.classNames,
|
|
11243
|
+
classNames = _4 === void 0 ? {} : _4,
|
|
11244
|
+
_5 = _a.colors,
|
|
11245
|
+
colors = _5 === void 0 ? {} : _5,
|
|
11246
|
+
_6 = _a.verbiage,
|
|
11247
|
+
verbiage = _6 === void 0 ? {} : _6,
|
|
11248
|
+
_7 = _a.debugMode,
|
|
11249
|
+
debugMode = _7 === void 0 ? false : _7;
|
|
11250
|
+
var _8 = React.useReducer(reducer$4, initialState$4),
|
|
11251
|
+
state = _8[0],
|
|
11252
|
+
dispatch = _8[1];
|
|
11253
11253
|
var releaseCameraAccess = React.useContext(CameraStateContext).releaseCameraAccess;
|
|
11254
|
-
var
|
|
11255
|
-
overlayDismissed =
|
|
11256
|
-
setOverlayDismissed =
|
|
11257
|
-
var
|
|
11258
|
-
submissionStatus =
|
|
11259
|
-
setIdFrontImage =
|
|
11260
|
-
setIdBackImage =
|
|
11261
|
-
setPassportImage =
|
|
11262
|
-
logIdFrontCaptureAttempt =
|
|
11263
|
-
logIdBackCaptureAttempt =
|
|
11254
|
+
var _9 = React.useState(false),
|
|
11255
|
+
overlayDismissed = _9[0],
|
|
11256
|
+
setOverlayDismissed = _9[1];
|
|
11257
|
+
var _10 = React.useContext(SubmissionContext),
|
|
11258
|
+
submissionStatus = _10.submissionStatus,
|
|
11259
|
+
setIdFrontImage = _10.setIdFrontImage,
|
|
11260
|
+
setIdBackImage = _10.setIdBackImage,
|
|
11261
|
+
setPassportImage = _10.setPassportImage,
|
|
11262
|
+
logIdFrontCaptureAttempt = _10.logIdFrontCaptureAttempt,
|
|
11263
|
+
logIdBackCaptureAttempt = _10.logIdBackCaptureAttempt;
|
|
11264
11264
|
var modelsError = React.useContext(IdCaptureModelsContext).error;
|
|
11265
11265
|
var operationStartedAt = React.useRef();
|
|
11266
11266
|
React.useEffect(function () {
|
|
@@ -11333,9 +11333,9 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
|
|
|
11333
11333
|
type: 'reset'
|
|
11334
11334
|
});
|
|
11335
11335
|
}, []);
|
|
11336
|
-
var
|
|
11337
|
-
attempt =
|
|
11338
|
-
setAttempt =
|
|
11336
|
+
var _11 = React.useState(0),
|
|
11337
|
+
attempt = _11[0],
|
|
11338
|
+
setAttempt = _11[1];
|
|
11339
11339
|
var onExit = React.useCallback(function () {
|
|
11340
11340
|
setOverlayDismissed(false);
|
|
11341
11341
|
setAttempt(function (n) {
|
|
@@ -11352,19 +11352,19 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
|
|
|
11352
11352
|
}
|
|
11353
11353
|
}, [releaseCameraAccess, releaseCameraAccessOnExit, submissionStatus]);
|
|
11354
11354
|
assets.idCardFront || (assets.idCardFront = {});
|
|
11355
|
-
(
|
|
11356
|
-
(
|
|
11355
|
+
(_e = assets.idCardFront).portraitGuidesImageUrl || (_e.portraitGuidesImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Front-SVG-Portrait-2.svg"));
|
|
11356
|
+
(_f = assets.idCardFront).landscapeGuidesImageUrl || (_f.landscapeGuidesImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Front-SVG-Landscape-2.svg"));
|
|
11357
11357
|
assets.idCardBack || (assets.idCardBack = {});
|
|
11358
|
-
(
|
|
11359
|
-
(
|
|
11358
|
+
(_g = assets.idCardBack).portraitGuidesImageUrl || (_g.portraitGuidesImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Back-SVG-Portrait-2.svg"));
|
|
11359
|
+
(_h = assets.idCardBack).landscapeGuidesImageUrl || (_h.landscapeGuidesImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Back-SVG-Landscape-2.svg"));
|
|
11360
11360
|
assets.passport || (assets.passport = {});
|
|
11361
|
-
(
|
|
11362
|
-
(
|
|
11361
|
+
(_j = assets.passport).portraitGuidesImageUrl || (_j.portraitGuidesImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-Passport-Front-SVG-Portrait-2.svg"));
|
|
11362
|
+
(_k = assets.passport).landscapeGuidesImageUrl || (_k.landscapeGuidesImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-Passport-Front-SVG-Landscape-2.svg"));
|
|
11363
11363
|
assets.flipIdPrompt || (assets.flipIdPrompt = {});
|
|
11364
|
-
(
|
|
11365
|
-
(
|
|
11366
|
-
(
|
|
11367
|
-
(
|
|
11364
|
+
(_l = assets.flipIdPrompt).frontPortraitGuidesImageUrl || (_l.frontPortraitGuidesImageUrl = assets.idCardFront.portraitGuidesImageUrl);
|
|
11365
|
+
(_m = assets.flipIdPrompt).frontLandscapeGuidesImageUrl || (_m.frontLandscapeGuidesImageUrl = assets.idCardFront.landscapeGuidesImageUrl);
|
|
11366
|
+
(_o = assets.flipIdPrompt).backPortraitGuidesImageUrl || (_o.backPortraitGuidesImageUrl = assets.idCardBack.portraitGuidesImageUrl);
|
|
11367
|
+
(_p = assets.flipIdPrompt).backLandscapeGuidesImageUrl || (_p.backLandscapeGuidesImageUrl = assets.idCardBack.landscapeGuidesImageUrl);
|
|
11368
11368
|
var idCaptureVerbiages = {
|
|
11369
11369
|
idCardFront: useTranslations(verbiage.idCardFront, {
|
|
11370
11370
|
instructionText: 'Scan the front of ID',
|
|
@@ -11377,11 +11377,11 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
|
|
|
11377
11377
|
instructionText: 'Scan the ID page of passport'
|
|
11378
11378
|
})
|
|
11379
11379
|
};
|
|
11380
|
-
var
|
|
11381
|
-
guideRectX =
|
|
11382
|
-
guideRectY =
|
|
11383
|
-
guideRectWidth =
|
|
11384
|
-
guideRectHeight =
|
|
11380
|
+
var _12 = useIdCaptureState()[0],
|
|
11381
|
+
guideRectX = _12.guideRectX,
|
|
11382
|
+
guideRectY = _12.guideRectY,
|
|
11383
|
+
guideRectWidth = _12.guideRectWidth,
|
|
11384
|
+
guideRectHeight = _12.guideRectHeight;
|
|
11385
11385
|
var idCaptureAssets = assets[state.requestedDocumentType];
|
|
11386
11386
|
var idCaptureVerbiage = idCaptureVerbiages[state.requestedDocumentType];
|
|
11387
11387
|
React.useEffect(function () {
|
|
@@ -11491,8 +11491,8 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
|
|
|
11491
11491
|
}(), /*#__PURE__*/React__default['default'].createElement(IdCaptureGuides, {
|
|
11492
11492
|
guideType: guideType,
|
|
11493
11493
|
requestingFlip: state.captureState === 'requestingFlip',
|
|
11494
|
-
frontImageUrl: assets === null || assets === void 0 ? void 0 : assets.
|
|
11495
|
-
backImageUrl: assets === null || assets === void 0 ? void 0 : assets.
|
|
11494
|
+
frontImageUrl: (_c = assets === null || assets === void 0 ? void 0 : assets.flipIdPrompt) === null || _c === void 0 ? void 0 : _c.frontLandscapeGuidesImageUrl,
|
|
11495
|
+
backImageUrl: (_d = assets === null || assets === void 0 ? void 0 : assets.flipIdPrompt) === null || _d === void 0 ? void 0 : _d.backLandscapeGuidesImageUrl,
|
|
11496
11496
|
classNames: classNames,
|
|
11497
11497
|
assets: idCaptureAssets,
|
|
11498
11498
|
colors: colors,
|