idmission-web-sdk 2.2.150 → 2.2.151

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/sdk2.esm.js CHANGED
@@ -203,7 +203,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
203
203
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
204
204
  };
205
205
 
206
- var webSdkVersion = '2.2.150';
206
+ var webSdkVersion = '2.2.151';
207
207
 
208
208
  function getPlatform() {
209
209
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -13260,24 +13260,26 @@ function useVideoSignatureContext() {
13260
13260
  }
13261
13261
 
13262
13262
  function VideoSignatureGuides(_a) {
13263
- var _b;
13264
- var _c = _a.requestedAction,
13265
- requestedAction = _c === void 0 ? 'VERIFY_LIVENESS' : _c,
13266
- _d = _a.faceGuideStatus,
13267
- faceGuideStatus = _d === void 0 ? 'success' : _d,
13263
+ var _b = _a.requestedAction,
13264
+ requestedAction = _b === void 0 ? 'VERIFY_LIVENESS' : _b,
13265
+ _c = _a.faceGuideStatus,
13266
+ faceGuideStatus = _c === void 0 ? 'success' : _c,
13268
13267
  faceGuideBorderWidth = _a.faceGuideBorderWidth,
13269
13268
  faceGuideBorderColor = _a.faceGuideBorderColor,
13270
- _e = _a.classNames,
13271
- classNames = _e === void 0 ? {} : _e,
13272
- _f = _a.verbiage,
13273
- rawVerbiage = _f === void 0 ? {} : _f;
13274
- var _g = useResizeObserver(),
13275
- ref = _g.ref,
13276
- width = _g.width,
13277
- height = _g.height;
13278
- var _h = useVideoSignatureContext(),
13279
- signaturePad = _h.signaturePad,
13280
- onAcceptClicked = _h.onAcceptClicked;
13269
+ _d = _a.classNames,
13270
+ classNames = _d === void 0 ? {} : _d,
13271
+ _e = _a.verbiage,
13272
+ rawVerbiage = _e === void 0 ? {} : _e;
13273
+ var _f = useResizeObserver(),
13274
+ ref = _f.ref,
13275
+ width = _f.width,
13276
+ height = _f.height;
13277
+ var _g = useVideoSignatureContext(),
13278
+ signaturePad = _g.signaturePad,
13279
+ onAcceptClicked = _g.onAcceptClicked;
13280
+ var _h = useState(true),
13281
+ isSignaturePadEmpty = _h[0],
13282
+ setIsSignaturePadEmpty = _h[1];
13281
13283
  var verbiage = useTranslations(rawVerbiage, {
13282
13284
  clearSignatureBtnText: 'Clear',
13283
13285
  acceptSignatureBtnText: 'Accept'
@@ -13311,19 +13313,27 @@ function VideoSignatureGuides(_a) {
13311
13313
  className: classNames.signatureCanvasInner
13312
13314
  }, /*#__PURE__*/React__default.createElement(SignatureCanvas, {
13313
13315
  ref: signaturePad,
13314
- canvasProps: canvasProps
13316
+ canvasProps: canvasProps,
13317
+ onEnd: function onEnd() {
13318
+ var _a;
13319
+ setIsSignaturePadEmpty(!!((_a = signaturePad === null || signaturePad === void 0 ? void 0 : signaturePad.current) === null || _a === void 0 ? void 0 : _a.isEmpty()));
13320
+ }
13315
13321
  })), /*#__PURE__*/React__default.createElement(SignatureButtonsContainer, {
13316
13322
  className: classNames.signatureButtonsRow
13317
13323
  }, /*#__PURE__*/React__default.createElement(LoaderButton, {
13318
13324
  variant: "secondary",
13319
13325
  className: classNames.clearSignatureBtn,
13320
- onClick: (_b = signaturePad === null || signaturePad === void 0 ? void 0 : signaturePad.current) === null || _b === void 0 ? void 0 : _b.clear,
13326
+ onClick: function onClick() {
13327
+ var _a, _b;
13328
+ (_a = signaturePad === null || signaturePad === void 0 ? void 0 : signaturePad.current) === null || _a === void 0 ? void 0 : _a.clear();
13329
+ setIsSignaturePadEmpty(!!((_b = signaturePad === null || signaturePad === void 0 ? void 0 : signaturePad.current) === null || _b === void 0 ? void 0 : _b.isEmpty()));
13330
+ },
13321
13331
  disabled: requestedAction === 'VERIFY_LIVENESS',
13322
13332
  finished: true
13323
13333
  }, verbiage.clearSignatureBtnText), /*#__PURE__*/React__default.createElement(AcceptBtn, {
13324
13334
  variant: "positive",
13325
13335
  className: classNames.acceptSignatureBtn,
13326
- disabled: requestedAction === 'VERIFY_LIVENESS',
13336
+ disabled: requestedAction === 'VERIFY_LIVENESS' || isSignaturePadEmpty,
13327
13337
  onClick: onAcceptClicked,
13328
13338
  finished: true
13329
13339
  }, verbiage.acceptSignatureBtnText))))));