idmission-web-sdk 2.3.23 → 2.3.25

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
@@ -204,7 +204,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
204
204
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
205
205
  };
206
206
 
207
- var webSdkVersion = '2.3.23';
207
+ var webSdkVersion = '2.3.25';
208
208
 
209
209
  function getPlatform() {
210
210
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -13555,7 +13555,7 @@ var useVideoSignatureStore = create()(devtools(function (set, get) {
13555
13555
  };
13556
13556
  signatureRecorder.start(100);
13557
13557
  },
13558
- stopRecording: function stopRecording() {
13558
+ stopRecording: function stopRecording(signatureData, imageUrl) {
13559
13559
  set({
13560
13560
  isRecording: false
13561
13561
  });
@@ -13567,13 +13567,8 @@ var useVideoSignatureStore = create()(devtools(function (set, get) {
13567
13567
  });
13568
13568
  signatureChunks = [];
13569
13569
  signatureRecorder = null;
13570
- var signaturePad = get().signaturePad.current;
13571
- if (!signaturePad) throw new Error('Signature pad not found');
13572
- var signatureData = buildSignatureData(signaturePad);
13573
- exportSignatureImage(signaturePad).then(function (imageUrl) {
13574
- if (imageUrl) signatureData.fileContent = dataUrlToBase64Sync(imageUrl);
13575
- get().onSignatureVideoCaptured(blob, signatureData, imageUrl);
13576
- });
13570
+ if (!signatureData) return;
13571
+ get().onSignatureVideoCaptured(blob, signatureData, imageUrl !== null && imageUrl !== void 0 ? imageUrl : null);
13577
13572
  };
13578
13573
  useVideoRecorderStore.getState().stopRecording();
13579
13574
  },
@@ -13700,7 +13695,13 @@ function VideoSignatureGuides(_a) {
13700
13695
  if (signaturePadEmpty) setEmptyContentDismissed(false);
13701
13696
  }, [signaturePadEmpty]);
13702
13697
  var onAcceptClicked = useCallback(function () {
13703
- useVideoSignatureStore.getState().stopRecording();
13698
+ if (!signaturePad.current) throw new Error('Signature pad not found');
13699
+ var signatureData = buildSignatureData(signaturePad.current);
13700
+ exportSignatureImage(signaturePad.current).then(function (imageUrl) {
13701
+ if (!imageUrl) throw new Error('Signature image not found');
13702
+ signatureData.fileContent = dataUrlToBase64Sync(imageUrl);
13703
+ useVideoSignatureStore.getState().stopRecording(signatureData, imageUrl);
13704
+ });
13704
13705
  }, []);
13705
13706
  return /*#__PURE__*/React__default.createElement(Container$3, {
13706
13707
  className: classNames.container