idmission-web-sdk 1.0.140 → 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 +95 -93
- 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 +95 -93
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +95 -93
- 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;
|
|
@@ -10903,12 +10903,11 @@ var regionClsx = function regionClsx(classNames, which) {
|
|
|
10903
10903
|
var templateObject_1$j, templateObject_2$d;
|
|
10904
10904
|
|
|
10905
10905
|
var IdCaptureFitGuide = function IdCaptureFitGuide(_a) {
|
|
10906
|
-
var _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
10906
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
10907
10907
|
var aspectRatio = _a.aspectRatio,
|
|
10908
|
-
|
|
10909
|
-
|
|
10910
|
-
|
|
10911
|
-
borderRadius = _m === void 0 ? 33 : _m,
|
|
10908
|
+
maskColor = _a.maskColor,
|
|
10909
|
+
_p = _a.borderRadius,
|
|
10910
|
+
borderRadius = _p === void 0 ? 33 : _p,
|
|
10912
10911
|
borderColor = _a.borderColor,
|
|
10913
10912
|
borderWidth = _a.borderWidth,
|
|
10914
10913
|
padding = _a.padding,
|
|
@@ -10917,23 +10916,23 @@ var IdCaptureFitGuide = function IdCaptureFitGuide(_a) {
|
|
|
10917
10916
|
backImageUrl = _a.backImageUrl,
|
|
10918
10917
|
isMirrored = _a.isMirrored,
|
|
10919
10918
|
instruction = _a.instruction,
|
|
10920
|
-
|
|
10921
|
-
requestingFlip =
|
|
10922
|
-
|
|
10923
|
-
classNames =
|
|
10924
|
-
var
|
|
10925
|
-
|
|
10926
|
-
redrawing =
|
|
10927
|
-
guideImageWidth =
|
|
10928
|
-
guideImageHeight =
|
|
10929
|
-
dispatch =
|
|
10919
|
+
_q = _a.requestingFlip,
|
|
10920
|
+
requestingFlip = _q === void 0 ? false : _q,
|
|
10921
|
+
_r = _a.classNames,
|
|
10922
|
+
classNames = _r === void 0 ? {} : _r;
|
|
10923
|
+
var _s = useIdCaptureState(),
|
|
10924
|
+
_t = _s[0],
|
|
10925
|
+
redrawing = _t.redrawing,
|
|
10926
|
+
guideImageWidth = _t.guideImageWidth,
|
|
10927
|
+
guideImageHeight = _t.guideImageHeight,
|
|
10928
|
+
dispatch = _s[1];
|
|
10930
10929
|
var canvasRef = React.useRef(null);
|
|
10931
|
-
var
|
|
10932
|
-
wrapperRef =
|
|
10933
|
-
|
|
10934
|
-
wrapperWidth =
|
|
10935
|
-
|
|
10936
|
-
wrapperHeight =
|
|
10930
|
+
var _u = useResizeObserver__default['default'](),
|
|
10931
|
+
wrapperRef = _u.ref,
|
|
10932
|
+
_v = _u.width,
|
|
10933
|
+
wrapperWidth = _v === void 0 ? 1 : _v,
|
|
10934
|
+
_w = _u.height,
|
|
10935
|
+
wrapperHeight = _w === void 0 ? 1 : _w;
|
|
10937
10936
|
var theme = styled.useTheme();
|
|
10938
10937
|
if (borderWidth === undefined) borderWidth = (_d = (_c = (_b = theme.idCapture) === null || _b === void 0 ? void 0 : _b.guideBox) === null || _c === void 0 ? void 0 : _c.borderWidth) !== null && _d !== void 0 ? _d : 4;
|
|
10939
10938
|
if (padding === undefined) {
|
|
@@ -10942,6 +10941,9 @@ var IdCaptureFitGuide = function IdCaptureFitGuide(_a) {
|
|
|
10942
10941
|
if (aspectRatio === undefined && guideImageWidth !== 0) {
|
|
10943
10942
|
aspectRatio = guideImageWidth / guideImageHeight;
|
|
10944
10943
|
}
|
|
10944
|
+
if (maskColor === undefined) {
|
|
10945
|
+
maskColor = (_o = (_m = (_l = theme.idCapture) === null || _l === void 0 ? void 0 : _l.guideOverlay) === null || _m === void 0 ? void 0 : _m.backgroundColor) !== null && _o !== void 0 ? _o : '#888';
|
|
10946
|
+
}
|
|
10945
10947
|
React.useEffect(function () {
|
|
10946
10948
|
var canvas = canvasRef.current;
|
|
10947
10949
|
if (!canvas) return;
|
|
@@ -11202,63 +11204,63 @@ var reducer$4 = function reducer(state, action) {
|
|
|
11202
11204
|
}
|
|
11203
11205
|
};
|
|
11204
11206
|
var IdCaptureWizard = function IdCaptureWizard(_a) {
|
|
11205
|
-
var _b;
|
|
11206
|
-
var
|
|
11207
|
+
var _b, _c, _d;
|
|
11208
|
+
var _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
11207
11209
|
var onSuccess = _a.onSuccess,
|
|
11208
11210
|
onExitCapture = _a.onExitCapture,
|
|
11209
11211
|
onUserCancel = _a.onUserCancel,
|
|
11210
11212
|
precapturedDocuments = _a.precapturedDocuments,
|
|
11211
|
-
|
|
11212
|
-
captureRequirement =
|
|
11213
|
-
|
|
11214
|
-
autoCaptureEnabled =
|
|
11215
|
-
|
|
11216
|
-
autoCaptureGoodFramesRequired =
|
|
11217
|
-
|
|
11218
|
-
autoCaptureBarcodeRequired =
|
|
11219
|
-
|
|
11220
|
-
barcodeScanningEnabled =
|
|
11221
|
-
|
|
11222
|
-
idCardAutoCaptureScoreThreshold =
|
|
11223
|
-
|
|
11224
|
-
passportAutoCaptureScoreThreshold =
|
|
11225
|
-
|
|
11226
|
-
mrzDetectionScoreThreshold =
|
|
11227
|
-
|
|
11228
|
-
idCardFocusScoreThreshold =
|
|
11229
|
-
|
|
11230
|
-
passportFocusScoreThreshold =
|
|
11231
|
-
|
|
11232
|
-
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,
|
|
11233
11235
|
instructions = _a.instructions,
|
|
11234
|
-
|
|
11235
|
-
releaseCameraAccessOnExit =
|
|
11236
|
-
|
|
11237
|
-
guideType =
|
|
11238
|
-
|
|
11239
|
-
assets =
|
|
11240
|
-
|
|
11241
|
-
classNames =
|
|
11242
|
-
|
|
11243
|
-
colors =
|
|
11244
|
-
|
|
11245
|
-
verbiage =
|
|
11246
|
-
|
|
11247
|
-
debugMode =
|
|
11248
|
-
var
|
|
11249
|
-
state =
|
|
11250
|
-
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];
|
|
11251
11253
|
var releaseCameraAccess = React.useContext(CameraStateContext).releaseCameraAccess;
|
|
11252
|
-
var
|
|
11253
|
-
overlayDismissed =
|
|
11254
|
-
setOverlayDismissed =
|
|
11255
|
-
var
|
|
11256
|
-
submissionStatus =
|
|
11257
|
-
setIdFrontImage =
|
|
11258
|
-
setIdBackImage =
|
|
11259
|
-
setPassportImage =
|
|
11260
|
-
logIdFrontCaptureAttempt =
|
|
11261
|
-
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;
|
|
11262
11264
|
var modelsError = React.useContext(IdCaptureModelsContext).error;
|
|
11263
11265
|
var operationStartedAt = React.useRef();
|
|
11264
11266
|
React.useEffect(function () {
|
|
@@ -11331,9 +11333,9 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
|
|
|
11331
11333
|
type: 'reset'
|
|
11332
11334
|
});
|
|
11333
11335
|
}, []);
|
|
11334
|
-
var
|
|
11335
|
-
attempt =
|
|
11336
|
-
setAttempt =
|
|
11336
|
+
var _11 = React.useState(0),
|
|
11337
|
+
attempt = _11[0],
|
|
11338
|
+
setAttempt = _11[1];
|
|
11337
11339
|
var onExit = React.useCallback(function () {
|
|
11338
11340
|
setOverlayDismissed(false);
|
|
11339
11341
|
setAttempt(function (n) {
|
|
@@ -11350,19 +11352,19 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
|
|
|
11350
11352
|
}
|
|
11351
11353
|
}, [releaseCameraAccess, releaseCameraAccessOnExit, submissionStatus]);
|
|
11352
11354
|
assets.idCardFront || (assets.idCardFront = {});
|
|
11353
|
-
(
|
|
11354
|
-
(
|
|
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"));
|
|
11355
11357
|
assets.idCardBack || (assets.idCardBack = {});
|
|
11356
|
-
(
|
|
11357
|
-
(
|
|
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"));
|
|
11358
11360
|
assets.passport || (assets.passport = {});
|
|
11359
|
-
(
|
|
11360
|
-
(
|
|
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"));
|
|
11361
11363
|
assets.flipIdPrompt || (assets.flipIdPrompt = {});
|
|
11362
|
-
(
|
|
11363
|
-
(
|
|
11364
|
-
(
|
|
11365
|
-
(
|
|
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);
|
|
11366
11368
|
var idCaptureVerbiages = {
|
|
11367
11369
|
idCardFront: useTranslations(verbiage.idCardFront, {
|
|
11368
11370
|
instructionText: 'Scan the front of ID',
|
|
@@ -11375,11 +11377,11 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
|
|
|
11375
11377
|
instructionText: 'Scan the ID page of passport'
|
|
11376
11378
|
})
|
|
11377
11379
|
};
|
|
11378
|
-
var
|
|
11379
|
-
guideRectX =
|
|
11380
|
-
guideRectY =
|
|
11381
|
-
guideRectWidth =
|
|
11382
|
-
guideRectHeight =
|
|
11380
|
+
var _12 = useIdCaptureState()[0],
|
|
11381
|
+
guideRectX = _12.guideRectX,
|
|
11382
|
+
guideRectY = _12.guideRectY,
|
|
11383
|
+
guideRectWidth = _12.guideRectWidth,
|
|
11384
|
+
guideRectHeight = _12.guideRectHeight;
|
|
11383
11385
|
var idCaptureAssets = assets[state.requestedDocumentType];
|
|
11384
11386
|
var idCaptureVerbiage = idCaptureVerbiages[state.requestedDocumentType];
|
|
11385
11387
|
React.useEffect(function () {
|
|
@@ -11489,8 +11491,8 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
|
|
|
11489
11491
|
}(), /*#__PURE__*/React__default['default'].createElement(IdCaptureGuides, {
|
|
11490
11492
|
guideType: guideType,
|
|
11491
11493
|
requestingFlip: state.captureState === 'requestingFlip',
|
|
11492
|
-
frontImageUrl: assets === null || assets === void 0 ? void 0 : assets.
|
|
11493
|
-
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,
|
|
11494
11496
|
classNames: classNames,
|
|
11495
11497
|
assets: idCaptureAssets,
|
|
11496
11498
|
colors: colors,
|