idmission-web-sdk 2.1.46 → 2.1.48

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.
@@ -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.46';
237
+ var webSdkVersion = '2.1.48';
238
238
 
239
239
  function getPlatform() {
240
240
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -2779,8 +2779,10 @@ function useLoadFocusModel(_a) {
2779
2779
  return [4 /*yield*/, waitForVideoReady(videoRef)];
2780
2780
  case 1:
2781
2781
  _a.sent();
2782
- loadedModel.classifyForVideo(videoRef.current, performance.now());
2783
- setReady(true);
2782
+ setTimeout(function () {
2783
+ loadedModel.classifyForVideo(videoRef.current, performance.now());
2784
+ setReady(true);
2785
+ }, 500);
2784
2786
  return [2 /*return*/];
2785
2787
  }
2786
2788
  });
@@ -5463,8 +5465,10 @@ function useLoadDocumentDetector(_a) {
5463
5465
  return [4 /*yield*/, waitForVideoReady(videoRef)];
5464
5466
  case 1:
5465
5467
  _a.sent();
5466
- model.detectForVideo(videoRef.current, performance.now());
5467
- setReady(true);
5468
+ setTimeout(function () {
5469
+ model.detectForVideo(videoRef.current, performance.now());
5470
+ setReady(true);
5471
+ }, 500);
5468
5472
  return [2 /*return*/];
5469
5473
  }
5470
5474
  });
@@ -10246,7 +10250,7 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
10246
10250
  colors: colors,
10247
10251
  verbiage: idCaptureVerbiage,
10248
10252
  isBackToFront: state.allowIdCardBackToFrontCapture && 'idCardBack' in state.capturedDocuments
10249
- }), !((_d = (_c = theme.idCapture) === null || _c === void 0 ? void 0 : _c.capturePreview) === null || _d === void 0 ? void 0 : _d.disabled) && state.captureState === 'requestingFlip' && !separateIdCardCaptureSequence && state.imageUrl && ( /*#__PURE__*/React__namespace.default.createElement(IdCaptureImagePreview, {
10253
+ }), debugMode && !((_d = (_c = theme.idCapture) === null || _c === void 0 ? void 0 : _c.capturePreview) === null || _d === void 0 ? void 0 : _d.disabled) && state.captureState === 'requestingFlip' && !separateIdCardCaptureSequence && state.imageUrl && ( /*#__PURE__*/React__namespace.default.createElement(IdCaptureImagePreview, {
10250
10254
  classNames: (_e = classNames.capture) === null || _e === void 0 ? void 0 : _e.imagePreview,
10251
10255
  text: (_f = idCaptureVerbiages === null || idCaptureVerbiages === void 0 ? void 0 : idCaptureVerbiages.idCardFront) === null || _f === void 0 ? void 0 : _f.processingIdCardText,
10252
10256
  imageUrl: state.imageUrl
@@ -11766,7 +11770,7 @@ var FaceLivenessCapture = function FaceLivenessCapture(_a) {
11766
11770
  colors: colors,
11767
11771
  verbiage: verbiage,
11768
11772
  debugMode: debugMode
11769
- }), !disableCapturePreview && imageUrl && ( /*#__PURE__*/React__namespace.default.createElement(SelfieProgressPreview, {
11773
+ }), debugMode && !disableCapturePreview && imageUrl && ( /*#__PURE__*/React__namespace.default.createElement(SelfieProgressPreview, {
11770
11774
  classNames: classNames.imagePreview,
11771
11775
  imageUrl: imageUrl,
11772
11776
  text: (_e = verbiage.progressPreviewText) !== null && _e !== void 0 ? _e : ''
@@ -13531,7 +13535,6 @@ var IdVideoCaptureGuides = function IdVideoCaptureGuides(_a) {
13531
13535
  _5 = _a.verbiage,
13532
13536
  rawVerbiage = _5 === void 0 ? {} : _5;
13533
13537
  var cameraRef = React.useContext(CameraStateContext).cameraRef;
13534
- // const imageRef = useRef<HTMLImageElement | null>(null)
13535
13538
  assets.frontImageUrl || (assets.frontImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Front-SVG-Landscape-Borderless.svg"));
13536
13539
  assets.backImageUrl || (assets.backImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Back-SVG-Landscape-Borderless.svg"));
13537
13540
  var verbiage = useTranslations(rawVerbiage, {
@@ -13555,15 +13558,6 @@ var IdVideoCaptureGuides = function IdVideoCaptureGuides(_a) {
13555
13558
  var _9 = React.useState(undefined),
13556
13559
  aspectRatio = _9[0],
13557
13560
  setAspectRatio = _9[1];
13558
- // const imageRef = (img: HTMLImageElement) => {
13559
- // if (!img) return
13560
- // if (typeof aspectRatio === 'number' && aspectRatio > 0) return
13561
- // setAspectRatio(
13562
- // (img.naturalHeight ?? 0) > 0
13563
- // ? img.naturalWidth / img.naturalHeight
13564
- // : undefined,
13565
- // )
13566
- // }
13567
13561
  function onImageLoaded(e) {
13568
13562
  var _a;
13569
13563
  var img = e.currentTarget;
@@ -13632,7 +13626,7 @@ var Inner = styled__default.default.div(templateObject_2$7 || (templateObject_2$
13632
13626
  var FaceGuideContainer = styled__default.default.div(templateObject_3$7 || (templateObject_3$7 = __makeTemplateObject(["\n position: relative;\n height: 70%;\n"], ["\n position: relative;\n height: 70%;\n"])));
13633
13627
  var IdCardGuideContainer = styled__default.default.div(templateObject_4$2 || (templateObject_4$2 = __makeTemplateObject(["\n display: flex;\n flex-flow: column nowrap;\n margin: 0 auto;\n position: relative;\n max-width: 100%;\n height: 30%;\n"], ["\n display: flex;\n flex-flow: column nowrap;\n margin: 0 auto;\n position: relative;\n max-width: 100%;\n height: 30%;\n"])));
13634
13628
  var IdCardGuideInner = styled__default.default.div(templateObject_5$1 || (templateObject_5$1 = __makeTemplateObject(["\n position: relative;\n height: 100%;\n"], ["\n position: relative;\n height: 100%;\n"])));
13635
- var IdCardGuideInstructionsContainer = styled__default.default.div(templateObject_6$1 || (templateObject_6$1 = __makeTemplateObject(["\n width: calc(100% - 80px);\n text-align: center;\n color: white;\n display: flex;\n flex-direction: column;\n justify-content: end;\n padding: 0 40px;\n position: fixed;\n bottom: 14px;\n left: 0;\n right: 0;\n"], ["\n width: calc(100% - 80px);\n text-align: center;\n color: white;\n display: flex;\n flex-direction: column;\n justify-content: end;\n padding: 0 40px;\n position: fixed;\n bottom: 14px;\n left: 0;\n right: 0;\n"])));
13629
+ var IdCardGuideInstructionsContainer = styled__default.default.div(templateObject_6$1 || (templateObject_6$1 = __makeTemplateObject(["\n width: 100%;\n text-align: center;\n color: white;\n display: flex;\n flex-direction: column;\n justify-content: end;\n padding: 0 40px;\n position: fixed;\n bottom: 14px;\n left: 0;\n right: 0;\n box-sizing: border-box;\n"], ["\n width: 100%;\n text-align: center;\n color: white;\n display: flex;\n flex-direction: column;\n justify-content: end;\n padding: 0 40px;\n position: fixed;\n bottom: 14px;\n left: 0;\n right: 0;\n box-sizing: border-box;\n"])));
13636
13630
  var IdCardGuideInstructions = styled__default.default(GuidanceMessage)(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n align-content: center;\n margin: 12px auto;\n padding: 8px 12px;\n font-weight: bold;\n font-size: 18px;\n"], ["\n align-content: center;\n margin: 12px auto;\n padding: 8px 12px;\n font-weight: bold;\n font-size: 18px;\n"])));
13637
13631
  var templateObject_1$7, templateObject_2$7, templateObject_3$7, templateObject_4$2, templateObject_5$1, templateObject_6$1, templateObject_7;
13638
13632
 
@@ -15938,7 +15932,7 @@ var CustomerVerificationCapture = function CustomerVerificationCapture(_a) {
15938
15932
  colors: colors,
15939
15933
  verbiage: verbiage,
15940
15934
  debugMode: debugMode
15941
- }), !((_c = (_b = theme.selfieCapture) === null || _b === void 0 ? void 0 : _b.capturePreview) === null || _c === void 0 ? void 0 : _c.disabled) && imageUrl && ( /*#__PURE__*/React__namespace.default.createElement(SelfieProgressPreview, {
15935
+ }), debugMode && !((_c = (_b = theme.selfieCapture) === null || _b === void 0 ? void 0 : _b.capturePreview) === null || _c === void 0 ? void 0 : _c.disabled) && imageUrl && ( /*#__PURE__*/React__namespace.default.createElement(SelfieProgressPreview, {
15942
15936
  imageUrl: imageUrl,
15943
15937
  text: progressPreviewText,
15944
15938
  classNames: classNames.imagePreview
@@ -16496,7 +16490,7 @@ var CustomerIdentificationCapture = function CustomerIdentificationCapture(_a) {
16496
16490
  colors: colors,
16497
16491
  verbiage: verbiage,
16498
16492
  debugMode: debugMode
16499
- }), !((_c = (_b = theme.selfieCapture) === null || _b === void 0 ? void 0 : _b.capturePreview) === null || _c === void 0 ? void 0 : _c.disabled) && imageUrl && ( /*#__PURE__*/React__namespace.default.createElement(SelfieProgressPreview, {
16493
+ }), debugMode && !((_c = (_b = theme.selfieCapture) === null || _b === void 0 ? void 0 : _b.capturePreview) === null || _c === void 0 ? void 0 : _c.disabled) && imageUrl && ( /*#__PURE__*/React__namespace.default.createElement(SelfieProgressPreview, {
16500
16494
  text: progressPreviewText,
16501
16495
  imageUrl: imageUrl,
16502
16496
  classNames: classNames.imagePreview