idmission-web-sdk 2.2.156 → 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.156';
214
+ var webSdkVersion = '2.2.157';
215
215
 
216
216
  function getPlatform() {
217
217
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -23223,6 +23223,7 @@
23223
23223
  className: classNames.signatureCanvas
23224
23224
  };
23225
23225
  }, [classNames.signatureCanvas, height, width]);
23226
+ var canSubmit = requestedAction === 'CAPTURE_SIGNATURE' && !isSignaturePadEmpty;
23226
23227
  return /*#__PURE__*/React.createElement(Container$1, {
23227
23228
  className: classNames.container
23228
23229
  }, /*#__PURE__*/React.createElement(Inner$1, {
@@ -23246,27 +23247,26 @@
23246
23247
  }, /*#__PURE__*/React.createElement(SignatureCanvas, {
23247
23248
  ref: signaturePad,
23248
23249
  canvasProps: canvasProps,
23249
- onEnd: function onEnd() {
23250
- var _a;
23251
- 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);
23252
23252
  }
23253
23253
  })), /*#__PURE__*/React.createElement(SignatureButtonsContainer, {
23254
23254
  className: classNames.signatureButtonsRow
23255
23255
  }, /*#__PURE__*/React.createElement(LoaderButton, {
23256
23256
  variant: "secondary",
23257
23257
  className: classNames.clearSignatureBtn,
23258
+ disabled: !canSubmit,
23258
23259
  onClick: function onClick() {
23259
- var _a, _b;
23260
+ var _a;
23261
+ setIsSignaturePadEmpty(true);
23260
23262
  (_a = signaturePad === null || signaturePad === void 0 ? void 0 : signaturePad.current) === null || _a === void 0 ? void 0 : _a.clear();
23261
- setIsSignaturePadEmpty(!!((_b = signaturePad === null || signaturePad === void 0 ? void 0 : signaturePad.current) === null || _b === void 0 ? void 0 : _b.isEmpty()));
23262
23263
  onClearSignaturePadClicked === null || onClearSignaturePadClicked === void 0 ? void 0 : onClearSignaturePadClicked();
23263
23264
  },
23264
- disabled: requestedAction === 'VERIFY_LIVENESS',
23265
23265
  finished: true
23266
23266
  }, verbiage.clearSignatureBtnText), /*#__PURE__*/React.createElement(AcceptBtn, {
23267
23267
  variant: "positive",
23268
23268
  className: classNames.acceptSignatureBtn,
23269
- disabled: requestedAction === 'VERIFY_LIVENESS' || isSignaturePadEmpty,
23269
+ disabled: !canSubmit,
23270
23270
  onClick: onAcceptClicked,
23271
23271
  finished: true
23272
23272
  }, verbiage.acceptSignatureBtnText))))));