@veltdev/react 4.0.0-beta.3 → 4.0.0-beta.5

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/cjs/index.js CHANGED
@@ -140,7 +140,7 @@ var loadVelt = function (callback, version, staging, develop, proxyDomain) {
140
140
  }
141
141
  };
142
142
 
143
- var VELT_SDK_VERSION = '4.0.0-beta.3';
143
+ var VELT_SDK_VERSION = '4.0.0-beta.5';
144
144
  var VELT_SDK_INIT_EVENT = 'onVeltInit';
145
145
  var VELT_TAB_ID = 'veltTabId';
146
146
 
@@ -4775,11 +4775,11 @@ function useCommentSidebarData() {
4775
4775
  function useAddCommentAnnotation() {
4776
4776
  var commentElement = useCommentUtils();
4777
4777
  return {
4778
- addCommentAnnotation: function (config) {
4778
+ addCommentAnnotation: function (request) {
4779
4779
  return new Promise(function (resolve, reject) {
4780
4780
  if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.addCommentAnnotation))
4781
4781
  return reject(new Error('Velt SDK is not initialized.'));
4782
- commentElement.addCommentAnnotation(config).then(resolve).catch(reject);
4782
+ commentElement.addCommentAnnotation(request).then(resolve).catch(reject);
4783
4783
  });
4784
4784
  }
4785
4785
  };
@@ -4787,11 +4787,11 @@ function useAddCommentAnnotation() {
4787
4787
  function useApproveCommentAnnotation() {
4788
4788
  var commentElement = useCommentUtils();
4789
4789
  return {
4790
- approveCommentAnnotation: function (config) {
4790
+ approveCommentAnnotation: function (request) {
4791
4791
  return new Promise(function (resolve, reject) {
4792
4792
  if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.approveCommentAnnotation))
4793
4793
  return reject(new Error('Velt SDK is not initialized.'));
4794
- commentElement.approveCommentAnnotation(config).then(resolve).catch(reject);
4794
+ commentElement.approveCommentAnnotation(request).then(resolve).catch(reject);
4795
4795
  });
4796
4796
  }
4797
4797
  };
@@ -4799,11 +4799,11 @@ function useApproveCommentAnnotation() {
4799
4799
  function useRejectCommentAnnotation() {
4800
4800
  var commentElement = useCommentUtils();
4801
4801
  return {
4802
- rejectCommentAnnotation: function (config) {
4802
+ rejectCommentAnnotation: function (request) {
4803
4803
  return new Promise(function (resolve, reject) {
4804
4804
  if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.rejectCommentAnnotation))
4805
4805
  return reject(new Error('Velt SDK is not initialized.'));
4806
- commentElement.rejectCommentAnnotation(config).then(resolve).catch(reject);
4806
+ commentElement.rejectCommentAnnotation(request).then(resolve).catch(reject);
4807
4807
  });
4808
4808
  }
4809
4809
  };
@@ -4811,11 +4811,11 @@ function useRejectCommentAnnotation() {
4811
4811
  function useSubscribeCommentAnnotation() {
4812
4812
  var commentElement = useCommentUtils();
4813
4813
  return {
4814
- subscribeCommentAnnotation: function (config) {
4814
+ subscribeCommentAnnotation: function (request) {
4815
4815
  return new Promise(function (resolve, reject) {
4816
4816
  if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.subscribeCommentAnnotation))
4817
4817
  return reject(new Error('Velt SDK is not initialized.'));
4818
- commentElement.subscribeCommentAnnotation(config).then(resolve).catch(reject);
4818
+ commentElement.subscribeCommentAnnotation(request).then(resolve).catch(reject);
4819
4819
  });
4820
4820
  }
4821
4821
  };
@@ -4823,11 +4823,11 @@ function useSubscribeCommentAnnotation() {
4823
4823
  function useUnsubscribeCommentAnnotation() {
4824
4824
  var commentElement = useCommentUtils();
4825
4825
  return {
4826
- unsubscribeCommentAnnotation: function (config) {
4826
+ unsubscribeCommentAnnotation: function (request) {
4827
4827
  return new Promise(function (resolve, reject) {
4828
4828
  if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.unsubscribeCommentAnnotation))
4829
4829
  return reject(new Error('Velt SDK is not initialized.'));
4830
- commentElement.unsubscribeCommentAnnotation(config).then(resolve).catch(reject);
4830
+ commentElement.unsubscribeCommentAnnotation(request).then(resolve).catch(reject);
4831
4831
  });
4832
4832
  }
4833
4833
  };
@@ -4835,23 +4835,23 @@ function useUnsubscribeCommentAnnotation() {
4835
4835
  function useDeleteCommentAnnotation() {
4836
4836
  var commentElement = useCommentUtils();
4837
4837
  return {
4838
- deleteCommentAnnotation: function (config) {
4838
+ deleteCommentAnnotation: function (request) {
4839
4839
  return new Promise(function (resolve, reject) {
4840
4840
  if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.deleteCommentAnnotation))
4841
4841
  return reject(new Error('Velt SDK is not initialized.'));
4842
- commentElement.deleteCommentAnnotation(config).then(resolve).catch(reject);
4842
+ commentElement.deleteCommentAnnotation(request).then(resolve).catch(reject);
4843
4843
  });
4844
4844
  }
4845
4845
  };
4846
4846
  }
4847
- function useGetCommentAnnotations(getCommentAnnotationsRequest) {
4847
+ function useGetCommentAnnotations(query) {
4848
4848
  var commentElement = useCommentUtils();
4849
4849
  var _a = React.useState({ data: null }), data = _a[0], setData = _a[1];
4850
4850
  var subscriptionRef = React.useRef();
4851
4851
  // Memoize the inputs
4852
4852
  var memoizedData = React.useMemo(function () {
4853
- return getCommentAnnotationsRequest;
4854
- }, [JSON.stringify(getCommentAnnotationsRequest)]);
4853
+ return query;
4854
+ }, [JSON.stringify(query)]);
4855
4855
  React.useEffect(function () {
4856
4856
  if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.getCommentAnnotations))
4857
4857
  return;
@@ -4879,14 +4879,14 @@ function useGetCommentAnnotations(getCommentAnnotationsRequest) {
4879
4879
  }, [commentElement === null || commentElement === void 0 ? void 0 : commentElement.getCommentAnnotations, memoizedData]);
4880
4880
  return data;
4881
4881
  }
4882
- function useCommentAnnotationsCount(getCommentAnnotationsCountRequest) {
4882
+ function useCommentAnnotationsCount(query) {
4883
4883
  var commentElement = useCommentUtils();
4884
4884
  var _a = React.useState({ data: null }), data = _a[0], setData = _a[1];
4885
4885
  var subscriptionRef = React.useRef();
4886
4886
  // Memoize the inputs
4887
4887
  var memoizedData = React.useMemo(function () {
4888
- return getCommentAnnotationsCountRequest;
4889
- }, [JSON.stringify(getCommentAnnotationsCountRequest)]);
4888
+ return query;
4889
+ }, [JSON.stringify(query)]);
4890
4890
  React.useEffect(function () {
4891
4891
  if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.getCommentAnnotationsCount))
4892
4892
  return;
@@ -4917,11 +4917,11 @@ function useCommentAnnotationsCount(getCommentAnnotationsCountRequest) {
4917
4917
  function useAssignUser() {
4918
4918
  var commentElement = useCommentUtils();
4919
4919
  return {
4920
- assignUser: function (config) {
4920
+ assignUser: function (request) {
4921
4921
  return new Promise(function (resolve, reject) {
4922
4922
  if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.assignUser))
4923
4923
  return reject(new Error('Velt SDK is not initialized.'));
4924
- commentElement.assignUser(config).then(resolve).catch(reject);
4924
+ commentElement.assignUser(request).then(resolve).catch(reject);
4925
4925
  });
4926
4926
  }
4927
4927
  };
@@ -4929,11 +4929,11 @@ function useAssignUser() {
4929
4929
  function useUpdatePriority() {
4930
4930
  var commentElement = useCommentUtils();
4931
4931
  return {
4932
- updatePriority: function (config) {
4932
+ updatePriority: function (request) {
4933
4933
  return new Promise(function (resolve, reject) {
4934
4934
  if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.updatePriority))
4935
4935
  return reject(new Error('Velt SDK is not initialized.'));
4936
- commentElement.updatePriority(config).then(resolve).catch(reject);
4936
+ commentElement.updatePriority(request).then(resolve).catch(reject);
4937
4937
  });
4938
4938
  }
4939
4939
  };
@@ -4941,11 +4941,11 @@ function useUpdatePriority() {
4941
4941
  function useUpdateStatus() {
4942
4942
  var commentElement = useCommentUtils();
4943
4943
  return {
4944
- updateStatus: function (config) {
4944
+ updateStatus: function (request) {
4945
4945
  return new Promise(function (resolve, reject) {
4946
4946
  if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.updateStatus))
4947
4947
  return reject(new Error('Velt SDK is not initialized.'));
4948
- commentElement.updateStatus(config).then(resolve).catch(reject);
4948
+ commentElement.updateStatus(request).then(resolve).catch(reject);
4949
4949
  });
4950
4950
  }
4951
4951
  };
@@ -4953,11 +4953,11 @@ function useUpdateStatus() {
4953
4953
  function useUpdateAccess() {
4954
4954
  var commentElement = useCommentUtils();
4955
4955
  return {
4956
- updateAccess: function (config) {
4956
+ updateAccess: function (request) {
4957
4957
  return new Promise(function (resolve, reject) {
4958
4958
  if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.updateAccess))
4959
4959
  return reject(new Error('Velt SDK is not initialized.'));
4960
- commentElement.updateAccess(config).then(resolve).catch(reject);
4960
+ commentElement.updateAccess(request).then(resolve).catch(reject);
4961
4961
  });
4962
4962
  }
4963
4963
  };
@@ -4965,11 +4965,11 @@ function useUpdateAccess() {
4965
4965
  function useResolveCommentAnnotation() {
4966
4966
  var commentElement = useCommentUtils();
4967
4967
  return {
4968
- resolveCommentAnnotation: function (config) {
4968
+ resolveCommentAnnotation: function (request) {
4969
4969
  return new Promise(function (resolve, reject) {
4970
4970
  if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.resolveCommentAnnotation))
4971
4971
  return reject(new Error('Velt SDK is not initialized.'));
4972
- commentElement.resolveCommentAnnotation(config).then(resolve).catch(reject);
4972
+ commentElement.resolveCommentAnnotation(request).then(resolve).catch(reject);
4973
4973
  });
4974
4974
  }
4975
4975
  };
@@ -4977,11 +4977,11 @@ function useResolveCommentAnnotation() {
4977
4977
  function useGetLink() {
4978
4978
  var commentElement = useCommentUtils();
4979
4979
  return {
4980
- getLink: function (config) {
4980
+ getLink: function (request) {
4981
4981
  return new Promise(function (resolve, reject) {
4982
4982
  if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.getLink))
4983
4983
  return reject(new Error('Velt SDK is not initialized.'));
4984
- commentElement.getLink(config).then(resolve).catch(reject);
4984
+ commentElement.getLink(request).then(resolve).catch(reject);
4985
4985
  });
4986
4986
  }
4987
4987
  };
@@ -4989,11 +4989,11 @@ function useGetLink() {
4989
4989
  function useCopyLink() {
4990
4990
  var commentElement = useCommentUtils();
4991
4991
  return {
4992
- copyLink: function (config) {
4992
+ copyLink: function (request) {
4993
4993
  return new Promise(function (resolve, reject) {
4994
4994
  if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.copyLink))
4995
4995
  return reject(new Error('Velt SDK is not initialized.'));
4996
- commentElement.copyLink(config).then(resolve).catch(reject);
4996
+ commentElement.copyLink(request).then(resolve).catch(reject);
4997
4997
  });
4998
4998
  }
4999
4999
  };
@@ -5001,11 +5001,11 @@ function useCopyLink() {
5001
5001
  function useAddComment() {
5002
5002
  var commentElement = useCommentUtils();
5003
5003
  return {
5004
- addComment: function (config) {
5004
+ addComment: function (request) {
5005
5005
  return new Promise(function (resolve, reject) {
5006
5006
  if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.addComment))
5007
5007
  return reject(new Error('Velt SDK is not initialized.'));
5008
- commentElement.addComment(config).then(resolve).catch(reject);
5008
+ commentElement.addComment(request).then(resolve).catch(reject);
5009
5009
  });
5010
5010
  }
5011
5011
  };
@@ -5013,11 +5013,11 @@ function useAddComment() {
5013
5013
  function useUpdateComment() {
5014
5014
  var commentElement = useCommentUtils();
5015
5015
  return {
5016
- updateComment: function (config) {
5016
+ updateComment: function (request) {
5017
5017
  return new Promise(function (resolve, reject) {
5018
5018
  if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.updateComment))
5019
5019
  return reject(new Error('Velt SDK is not initialized.'));
5020
- commentElement.updateComment(config).then(resolve).catch(reject);
5020
+ commentElement.updateComment(request).then(resolve).catch(reject);
5021
5021
  });
5022
5022
  }
5023
5023
  };
@@ -5025,11 +5025,11 @@ function useUpdateComment() {
5025
5025
  function useDeleteComment() {
5026
5026
  var commentElement = useCommentUtils();
5027
5027
  return {
5028
- deleteComment: function (config) {
5028
+ deleteComment: function (request) {
5029
5029
  return new Promise(function (resolve, reject) {
5030
5030
  if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.deleteComment))
5031
5031
  return reject(new Error('Velt SDK is not initialized.'));
5032
- commentElement.deleteComment(config).then(resolve).catch(reject);
5032
+ commentElement.deleteComment(request).then(resolve).catch(reject);
5033
5033
  });
5034
5034
  }
5035
5035
  };
@@ -5037,11 +5037,11 @@ function useDeleteComment() {
5037
5037
  function useGetComment() {
5038
5038
  var commentElement = useCommentUtils();
5039
5039
  return {
5040
- getComment: function (config) {
5040
+ getComment: function (request) {
5041
5041
  return new Promise(function (resolve, reject) {
5042
5042
  if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.getComment))
5043
5043
  return reject(new Error('Velt SDK is not initialized.'));
5044
- commentElement.getComment(config).then(resolve).catch(reject);
5044
+ commentElement.getComment(request).then(resolve).catch(reject);
5045
5045
  });
5046
5046
  }
5047
5047
  };
@@ -5049,11 +5049,11 @@ function useGetComment() {
5049
5049
  function useAddAttachment() {
5050
5050
  var commentElement = useCommentUtils();
5051
5051
  return {
5052
- addAttachment: function (config) {
5052
+ addAttachment: function (request) {
5053
5053
  return new Promise(function (resolve, reject) {
5054
5054
  if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.addAttachment))
5055
5055
  return reject(new Error('Velt SDK is not initialized.'));
5056
- commentElement.addAttachment(config).then(resolve).catch(reject);
5056
+ commentElement.addAttachment(request).then(resolve).catch(reject);
5057
5057
  });
5058
5058
  }
5059
5059
  };
@@ -5061,11 +5061,11 @@ function useAddAttachment() {
5061
5061
  function useDeleteAttachment() {
5062
5062
  var commentElement = useCommentUtils();
5063
5063
  return {
5064
- deleteAttachment: function (config) {
5064
+ deleteAttachment: function (request) {
5065
5065
  return new Promise(function (resolve, reject) {
5066
5066
  if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.deleteAttachment))
5067
5067
  return reject(new Error('Velt SDK is not initialized.'));
5068
- commentElement.deleteAttachment(config).then(resolve).catch(reject);
5068
+ commentElement.deleteAttachment(request).then(resolve).catch(reject);
5069
5069
  });
5070
5070
  }
5071
5071
  };
@@ -5073,11 +5073,11 @@ function useDeleteAttachment() {
5073
5073
  function useGetAttachment() {
5074
5074
  var commentElement = useCommentUtils();
5075
5075
  return {
5076
- getAttachment: function (config) {
5076
+ getAttachment: function (request) {
5077
5077
  return new Promise(function (resolve, reject) {
5078
5078
  if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.getAttachment))
5079
5079
  return reject(new Error('Velt SDK is not initialized.'));
5080
- commentElement.getAttachment(config).then(resolve).catch(reject);
5080
+ commentElement.getAttachment(request).then(resolve).catch(reject);
5081
5081
  });
5082
5082
  }
5083
5083
  };
@@ -5085,11 +5085,11 @@ function useGetAttachment() {
5085
5085
  function useDeleteRecording() {
5086
5086
  var commentElement = useCommentUtils();
5087
5087
  return {
5088
- deleteRecording: function (config) {
5088
+ deleteRecording: function (request) {
5089
5089
  return new Promise(function (resolve, reject) {
5090
5090
  if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.deleteRecording))
5091
5091
  return reject(new Error('Velt SDK is not initialized.'));
5092
- commentElement.deleteRecording(config).then(resolve).catch(reject);
5092
+ commentElement.deleteRecording(request).then(resolve).catch(reject);
5093
5093
  });
5094
5094
  }
5095
5095
  };
@@ -5097,11 +5097,11 @@ function useDeleteRecording() {
5097
5097
  function useGetRecording() {
5098
5098
  var commentElement = useCommentUtils();
5099
5099
  return {
5100
- getRecording: function (config) {
5100
+ getRecording: function (request) {
5101
5101
  return new Promise(function (resolve, reject) {
5102
5102
  if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.getRecording))
5103
5103
  return reject(new Error('Velt SDK is not initialized.'));
5104
- commentElement.getRecording(config).then(resolve).catch(reject);
5104
+ commentElement.getRecording(request).then(resolve).catch(reject);
5105
5105
  });
5106
5106
  }
5107
5107
  };
@@ -5109,11 +5109,11 @@ function useGetRecording() {
5109
5109
  function useAddReaction() {
5110
5110
  var commentElement = useCommentUtils();
5111
5111
  return {
5112
- addReaction: function (config) {
5112
+ addReaction: function (request) {
5113
5113
  return new Promise(function (resolve, reject) {
5114
5114
  if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.addReaction))
5115
5115
  return reject(new Error('Velt SDK is not initialized.'));
5116
- commentElement.addReaction(config).then(resolve).catch(reject);
5116
+ commentElement.addReaction(request).then(resolve).catch(reject);
5117
5117
  });
5118
5118
  }
5119
5119
  };
@@ -5121,11 +5121,11 @@ function useAddReaction() {
5121
5121
  function useDeleteReaction() {
5122
5122
  var commentElement = useCommentUtils();
5123
5123
  return {
5124
- deleteReaction: function (config) {
5124
+ deleteReaction: function (request) {
5125
5125
  return new Promise(function (resolve, reject) {
5126
5126
  if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.deleteReaction))
5127
5127
  return reject(new Error('Velt SDK is not initialized.'));
5128
- commentElement.deleteReaction(config).then(resolve).catch(reject);
5128
+ commentElement.deleteReaction(request).then(resolve).catch(reject);
5129
5129
  });
5130
5130
  }
5131
5131
  };
@@ -5133,11 +5133,11 @@ function useDeleteReaction() {
5133
5133
  function useToggleReaction() {
5134
5134
  var commentElement = useCommentUtils();
5135
5135
  return {
5136
- toggleReaction: function (config) {
5136
+ toggleReaction: function (request) {
5137
5137
  return new Promise(function (resolve, reject) {
5138
5138
  if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.toggleReaction))
5139
5139
  return reject(new Error('Velt SDK is not initialized.'));
5140
- commentElement.toggleReaction(config).then(resolve).catch(reject);
5140
+ commentElement.toggleReaction(request).then(resolve).catch(reject);
5141
5141
  });
5142
5142
  }
5143
5143
  };