idmission-web-sdk 2.2.155 → 2.2.157

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.
@@ -211,7 +211,7 @@
211
211
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
212
212
  };
213
213
 
214
- var webSdkVersion = '2.2.155';
214
+ var webSdkVersion = '2.2.157';
215
215
 
216
216
  function getPlatform() {
217
217
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -2407,7 +2407,9 @@
2407
2407
  }
2408
2408
  });
2409
2409
  });
2410
- }))];
2410
+ }))["catch"](function (e) {
2411
+ throw new NetworkError(e.message);
2412
+ })];
2411
2413
  case 7:
2412
2414
  _j.sent();
2413
2415
  _j.label = 8;
@@ -2650,6 +2652,8 @@
2650
2652
  return [4 /*yield*/, uploadDocument(selfie, {
2651
2653
  filename: 'liveness',
2652
2654
  filetype: 'image/jpeg'
2655
+ })["catch"](function (e) {
2656
+ throw new NetworkError(e.message);
2653
2657
  })];
2654
2658
  case 1:
2655
2659
  selfie = _a.sent();
@@ -23219,6 +23223,7 @@
23219
23223
  className: classNames.signatureCanvas
23220
23224
  };
23221
23225
  }, [classNames.signatureCanvas, height, width]);
23226
+ var canSubmit = requestedAction === 'CAPTURE_SIGNATURE' && !isSignaturePadEmpty;
23222
23227
  return /*#__PURE__*/React.createElement(Container$1, {
23223
23228
  className: classNames.container
23224
23229
  }, /*#__PURE__*/React.createElement(Inner$1, {
@@ -23242,27 +23247,26 @@
23242
23247
  }, /*#__PURE__*/React.createElement(SignatureCanvas, {
23243
23248
  ref: signaturePad,
23244
23249
  canvasProps: canvasProps,
23245
- onEnd: function onEnd() {
23246
- var _a;
23247
- setIsSignaturePadEmpty(!!((_a = signaturePad === null || signaturePad === void 0 ? void 0 : signaturePad.current) === null || _a === void 0 ? void 0 : _a.isEmpty()));
23250
+ onBegin: function onBegin() {
23251
+ return setIsSignaturePadEmpty(false);
23248
23252
  }
23249
23253
  })), /*#__PURE__*/React.createElement(SignatureButtonsContainer, {
23250
23254
  className: classNames.signatureButtonsRow
23251
23255
  }, /*#__PURE__*/React.createElement(LoaderButton, {
23252
23256
  variant: "secondary",
23253
23257
  className: classNames.clearSignatureBtn,
23258
+ disabled: !canSubmit,
23254
23259
  onClick: function onClick() {
23255
- var _a, _b;
23260
+ var _a;
23261
+ setIsSignaturePadEmpty(true);
23256
23262
  (_a = signaturePad === null || signaturePad === void 0 ? void 0 : signaturePad.current) === null || _a === void 0 ? void 0 : _a.clear();
23257
- setIsSignaturePadEmpty(!!((_b = signaturePad === null || signaturePad === void 0 ? void 0 : signaturePad.current) === null || _b === void 0 ? void 0 : _b.isEmpty()));
23258
23263
  onClearSignaturePadClicked === null || onClearSignaturePadClicked === void 0 ? void 0 : onClearSignaturePadClicked();
23259
23264
  },
23260
- disabled: requestedAction === 'VERIFY_LIVENESS',
23261
23265
  finished: true
23262
23266
  }, verbiage.clearSignatureBtnText), /*#__PURE__*/React.createElement(AcceptBtn, {
23263
23267
  variant: "positive",
23264
23268
  className: classNames.acceptSignatureBtn,
23265
- disabled: requestedAction === 'VERIFY_LIVENESS' || isSignaturePadEmpty,
23269
+ disabled: !canSubmit,
23266
23270
  onClick: onAcceptClicked,
23267
23271
  finished: true
23268
23272
  }, verbiage.acceptSignatureBtnText))))));