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.
@@ -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.150';
214
+ var webSdkVersion = '2.2.151';
215
215
 
216
216
  function getPlatform() {
217
217
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -23152,24 +23152,26 @@
23152
23152
  }
23153
23153
 
23154
23154
  function VideoSignatureGuides(_a) {
23155
- var _b;
23156
- var _c = _a.requestedAction,
23157
- requestedAction = _c === void 0 ? 'VERIFY_LIVENESS' : _c,
23158
- _d = _a.faceGuideStatus,
23159
- faceGuideStatus = _d === void 0 ? 'success' : _d,
23155
+ var _b = _a.requestedAction,
23156
+ requestedAction = _b === void 0 ? 'VERIFY_LIVENESS' : _b,
23157
+ _c = _a.faceGuideStatus,
23158
+ faceGuideStatus = _c === void 0 ? 'success' : _c,
23160
23159
  faceGuideBorderWidth = _a.faceGuideBorderWidth,
23161
23160
  faceGuideBorderColor = _a.faceGuideBorderColor,
23162
- _e = _a.classNames,
23163
- classNames = _e === void 0 ? {} : _e,
23164
- _f = _a.verbiage,
23165
- rawVerbiage = _f === void 0 ? {} : _f;
23166
- var _g = useResizeObserver(),
23167
- ref = _g.ref,
23168
- width = _g.width,
23169
- height = _g.height;
23170
- var _h = useVideoSignatureContext(),
23171
- signaturePad = _h.signaturePad,
23172
- onAcceptClicked = _h.onAcceptClicked;
23161
+ _d = _a.classNames,
23162
+ classNames = _d === void 0 ? {} : _d,
23163
+ _e = _a.verbiage,
23164
+ rawVerbiage = _e === void 0 ? {} : _e;
23165
+ var _f = useResizeObserver(),
23166
+ ref = _f.ref,
23167
+ width = _f.width,
23168
+ height = _f.height;
23169
+ var _g = useVideoSignatureContext(),
23170
+ signaturePad = _g.signaturePad,
23171
+ onAcceptClicked = _g.onAcceptClicked;
23172
+ var _h = React.useState(true),
23173
+ isSignaturePadEmpty = _h[0],
23174
+ setIsSignaturePadEmpty = _h[1];
23173
23175
  var verbiage = useTranslations(rawVerbiage, {
23174
23176
  clearSignatureBtnText: 'Clear',
23175
23177
  acceptSignatureBtnText: 'Accept'
@@ -23203,19 +23205,27 @@
23203
23205
  className: classNames.signatureCanvasInner
23204
23206
  }, /*#__PURE__*/React.createElement(SignatureCanvas, {
23205
23207
  ref: signaturePad,
23206
- canvasProps: canvasProps
23208
+ canvasProps: canvasProps,
23209
+ onEnd: function onEnd() {
23210
+ var _a;
23211
+ setIsSignaturePadEmpty(!!((_a = signaturePad === null || signaturePad === void 0 ? void 0 : signaturePad.current) === null || _a === void 0 ? void 0 : _a.isEmpty()));
23212
+ }
23207
23213
  })), /*#__PURE__*/React.createElement(SignatureButtonsContainer, {
23208
23214
  className: classNames.signatureButtonsRow
23209
23215
  }, /*#__PURE__*/React.createElement(LoaderButton, {
23210
23216
  variant: "secondary",
23211
23217
  className: classNames.clearSignatureBtn,
23212
- onClick: (_b = signaturePad === null || signaturePad === void 0 ? void 0 : signaturePad.current) === null || _b === void 0 ? void 0 : _b.clear,
23218
+ onClick: function onClick() {
23219
+ var _a, _b;
23220
+ (_a = signaturePad === null || signaturePad === void 0 ? void 0 : signaturePad.current) === null || _a === void 0 ? void 0 : _a.clear();
23221
+ setIsSignaturePadEmpty(!!((_b = signaturePad === null || signaturePad === void 0 ? void 0 : signaturePad.current) === null || _b === void 0 ? void 0 : _b.isEmpty()));
23222
+ },
23213
23223
  disabled: requestedAction === 'VERIFY_LIVENESS',
23214
23224
  finished: true
23215
23225
  }, verbiage.clearSignatureBtnText), /*#__PURE__*/React.createElement(AcceptBtn, {
23216
23226
  variant: "positive",
23217
23227
  className: classNames.acceptSignatureBtn,
23218
- disabled: requestedAction === 'VERIFY_LIVENESS',
23228
+ disabled: requestedAction === 'VERIFY_LIVENESS' || isSignaturePadEmpty,
23219
23229
  onClick: onAcceptClicked,
23220
23230
  finished: true
23221
23231
  }, verbiage.acceptSignatureBtnText))))));