idmission-web-sdk 2.3.83 → 2.3.85

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.3.83';
214
+ var webSdkVersion = '2.3.85';
215
215
 
216
216
  function getPlatform() {
217
217
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -24200,14 +24200,11 @@
24200
24200
  onHeadTrackingPredictionMade = _o.onPredictionMade,
24201
24201
  startHeadTracking = _o.start,
24202
24202
  stopHeadTracking = _o.stop;
24203
- var _p = useVideoSignatureStore(useShallow(function (state) {
24204
- return {
24205
- clearRecordedData: state.clearRecordedData,
24206
- firstChunkReceivedAt: state.firstChunkReceivedAt
24207
- };
24208
- })),
24209
- clearRecordedData = _p.clearRecordedData,
24210
- firstChunkReceivedAt = _p.firstChunkReceivedAt;
24203
+ var firstChunkReceivedAt = useVideoSignatureStore(useShallow(function (state) {
24204
+ return {
24205
+ firstChunkReceivedAt: state.firstChunkReceivedAt
24206
+ };
24207
+ })).firstChunkReceivedAt;
24211
24208
  React.useEffect(function () {
24212
24209
  useVideoSignatureStore.setState({
24213
24210
  onSignatureVideoCaptured: onSignatureVideoCaptured
@@ -24226,15 +24223,15 @@
24226
24223
  var verbiage = useTranslations(rawVerbiage, {
24227
24224
  guidanceMessageText: 'Please sign the box below'
24228
24225
  });
24229
- var _q = React.useState(true),
24230
- headTrackingSatisfied = _q[0],
24231
- setHeadTrackingSatisfied = _q[1];
24232
- var _r = React.useState(null),
24233
- lastFace = _r[0],
24234
- setLastFace = _r[1];
24235
- var _s = React.useState(0),
24236
- numFramesWithoutFaces = _s[0],
24237
- setNumFramesWithoutFaces = _s[1];
24226
+ var _p = React.useState(true),
24227
+ headTrackingSatisfied = _p[0],
24228
+ setHeadTrackingSatisfied = _p[1];
24229
+ var _q = React.useState(null),
24230
+ lastFace = _q[0],
24231
+ setLastFace = _q[1];
24232
+ var _r = React.useState(0),
24233
+ numFramesWithoutFaces = _r[0],
24234
+ setNumFramesWithoutFaces = _r[1];
24238
24235
  onHeadTrackingPredictionMade(f(React.useCallback(function (_a) {
24239
24236
  var face = _a.face;
24240
24237
  if (headTrackingDisabled) return;
@@ -24249,12 +24246,12 @@
24249
24246
  return n + 1;
24250
24247
  });
24251
24248
  }, [headTrackingBoundaryPercentage, headTrackingBoundaryType, headTrackingDisabled, videoHeight, videoWidth]), 16));
24252
- var _t = useResizeObserver(),
24253
- ref = _t.ref,
24254
- _u = _t.width,
24255
- width = _u === void 0 ? 1 : _u,
24256
- _v = _t.height,
24257
- height = _v === void 0 ? 1 : _v;
24249
+ var _s = useResizeObserver(),
24250
+ ref = _s.ref,
24251
+ _t = _s.width,
24252
+ width = _t === void 0 ? 1 : _t,
24253
+ _u = _s.height,
24254
+ height = _u === void 0 ? 1 : _u;
24258
24255
  var debugScalingDetails = useDebugScalingDetails({
24259
24256
  enabled: debugMode,
24260
24257
  pageWidth: width,
@@ -24285,8 +24282,14 @@
24285
24282
  classNames: classNames.guides,
24286
24283
  verbiage: rawVerbiage.guides,
24287
24284
  onClearBtnClicked: restartVideoOnSignaturePadCleared ? function () {
24288
- return setTimeout(clearRecordedData, 100);
24289
- } : undefined
24285
+ return setTimeout(function () {
24286
+ return useVideoSignatureStore.getState().clearRecordedData();
24287
+ }, 100);
24288
+ } : function () {
24289
+ return useVideoSignatureStore.setState({
24290
+ signatureStartedAt: undefined
24291
+ });
24292
+ }
24290
24293
  }), debugMode && ( /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ObjectDetectionDebugOverlayDiv, null, lastFace && ( /*#__PURE__*/React.createElement(SelfieCaptureFaceDebugBox, {
24291
24294
  face: lastFace,
24292
24295
  scaling: debugScalingDetails,
@@ -24859,6 +24862,7 @@
24859
24862
  var onClearBtnClicked = React.useCallback(function () {
24860
24863
  var _a, _b;
24861
24864
  useVideoSignatureStore.setState({
24865
+ signatureStartedAt: undefined,
24862
24866
  signaturePadEmpty: true,
24863
24867
  signatureValid: false
24864
24868
  });