@veltdev/react 3.0.68 → 3.0.70

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 = '3.0.68';
143
+ var VELT_SDK_VERSION = '3.0.70';
144
144
  var VELT_SDK_INIT_EVENT = 'onVeltInit';
145
145
  var VELT_TAB_ID = 'veltTabId';
146
146
 
@@ -363,7 +363,7 @@ var SnippylyComments = function (props) {
363
363
  };
364
364
 
365
365
  var SnippylyCommentsSidebar = function (props) {
366
- var embedMode = props.embedMode; props.floatingMode; var enableUrlNavigation = props.enableUrlNavigation, urlNavigation = props.urlNavigation, queryParamsComments = props.queryParamsComments, pageMode = props.pageMode, currentLocationSuffix = props.currentLocationSuffix, sortData = props.sortData, filterConfig = props.filterConfig, groupConfig = props.groupConfig, filters = props.filters, excludeLocationIds = props.excludeLocationIds, variant = props.variant, pageModeComposerVariant = props.pageModeComposerVariant, dialogVariant = props.dialogVariant, shadowDom = props.shadowDom, openSidebar = props.openSidebar, onSidebarOpen = props.onSidebarOpen, onSidebarCommentClick = props.onSidebarCommentClick, onCommentClick = props.onCommentClick, onSidebarClose = props.onSidebarClose, darkMode = props.darkMode, position = props.position, filterPanelLayout = props.filterPanelLayout, customActions = props.customActions, focusedThreadDialogVariant = props.focusedThreadDialogVariant, focusedThreadMode = props.focusedThreadMode, onCommentNavigationButtonClick = props.onCommentNavigationButtonClick;
366
+ var embedMode = props.embedMode; props.floatingMode; var enableUrlNavigation = props.enableUrlNavigation, urlNavigation = props.urlNavigation, queryParamsComments = props.queryParamsComments, pageMode = props.pageMode, currentLocationSuffix = props.currentLocationSuffix, sortData = props.sortData, filterConfig = props.filterConfig, groupConfig = props.groupConfig, filters = props.filters, excludeLocationIds = props.excludeLocationIds, variant = props.variant, pageModeComposerVariant = props.pageModeComposerVariant, dialogVariant = props.dialogVariant, shadowDom = props.shadowDom, searchPlaceholder = props.searchPlaceholder, openSidebar = props.openSidebar, onSidebarOpen = props.onSidebarOpen, onSidebarCommentClick = props.onSidebarCommentClick, onCommentClick = props.onCommentClick, onSidebarClose = props.onSidebarClose, darkMode = props.darkMode, position = props.position, filterPanelLayout = props.filterPanelLayout, customActions = props.customActions, focusedThreadDialogVariant = props.focusedThreadDialogVariant, focusedThreadMode = props.focusedThreadMode, onCommentNavigationButtonClick = props.onCommentNavigationButtonClick;
367
367
  var ref = React.useRef();
368
368
  var openSidebarRef = React.useRef(openSidebar);
369
369
  var onSidebarOpenRef = React.useRef(onSidebarOpen);
@@ -436,7 +436,7 @@ var SnippylyCommentsSidebar = function (props) {
436
436
  }
437
437
  };
438
438
  }, []);
439
- return (React__default["default"].createElement("velt-comments-sidebar", { ref: ref, position: position, "filter-panel-layout": filterPanelLayout, "focused-thread-mode": [true, false].includes(focusedThreadMode) ? (focusedThreadMode ? 'true' : 'false') : undefined, "focused-thread-dialog-variant": focusedThreadDialogVariant, "custom-actions": [true, false].includes(customActions) ? (customActions ? 'true' : 'false') : undefined, "shadow-dom": [true, false].includes(shadowDom) ? (shadowDom ? 'true' : 'false') : undefined, "embed-mode": [true, false].includes(embedMode) ? (embedMode ? 'true' : 'false') : undefined, "enable-url-navigation": [true, false].includes(enableUrlNavigation) ? (enableUrlNavigation ? 'true' : 'false') : undefined, "url-navigation": [true, false].includes(urlNavigation) ? (urlNavigation ? 'true' : 'false') : undefined, "query-params-comments": [true, false].includes(queryParamsComments) ? (queryParamsComments ? 'true' : 'false') : undefined, "page-mode": [true, false].includes(pageMode) ? (pageMode ? 'true' : 'false') : undefined, "current-location-suffix": [true, false].includes(currentLocationSuffix) ? (currentLocationSuffix ? 'true' : 'false') : undefined, "filter-config": filterConfig ? JSON.stringify(filterConfig) : undefined, "group-config": groupConfig ? JSON.stringify(groupConfig) : undefined, filters: filters ? JSON.stringify(filters) : undefined, "exclude-location-ids": excludeLocationIds ? JSON.stringify(excludeLocationIds) : undefined, variant: variant, "page-mode-composer-variant": pageModeComposerVariant, "dialog-variant": dialogVariant, "sort-data": sortData, "dark-mode": [true, false].includes(darkMode) ? (darkMode ? 'true' : 'false') : undefined, "floating-mode": [true, false].includes(embedMode) ? (embedMode ? 'true' : 'false') : undefined }));
439
+ return (React__default["default"].createElement("velt-comments-sidebar", { ref: ref, position: position, "filter-panel-layout": filterPanelLayout, "focused-thread-mode": [true, false].includes(focusedThreadMode) ? (focusedThreadMode ? 'true' : 'false') : undefined, "focused-thread-dialog-variant": focusedThreadDialogVariant, "custom-actions": [true, false].includes(customActions) ? (customActions ? 'true' : 'false') : undefined, "shadow-dom": [true, false].includes(shadowDom) ? (shadowDom ? 'true' : 'false') : undefined, "embed-mode": [true, false].includes(embedMode) ? (embedMode ? 'true' : 'false') : undefined, "enable-url-navigation": [true, false].includes(enableUrlNavigation) ? (enableUrlNavigation ? 'true' : 'false') : undefined, "url-navigation": [true, false].includes(urlNavigation) ? (urlNavigation ? 'true' : 'false') : undefined, "query-params-comments": [true, false].includes(queryParamsComments) ? (queryParamsComments ? 'true' : 'false') : undefined, "page-mode": [true, false].includes(pageMode) ? (pageMode ? 'true' : 'false') : undefined, "current-location-suffix": [true, false].includes(currentLocationSuffix) ? (currentLocationSuffix ? 'true' : 'false') : undefined, "filter-config": filterConfig ? JSON.stringify(filterConfig) : undefined, "group-config": groupConfig ? JSON.stringify(groupConfig) : undefined, filters: filters ? JSON.stringify(filters) : undefined, "exclude-location-ids": excludeLocationIds ? JSON.stringify(excludeLocationIds) : undefined, variant: variant, "page-mode-composer-variant": pageModeComposerVariant, "dialog-variant": dialogVariant, "sort-data": sortData, "search-placeholder": searchPlaceholder, "dark-mode": [true, false].includes(darkMode) ? (darkMode ? 'true' : 'false') : undefined, "floating-mode": [true, false].includes(embedMode) ? (embedMode ? 'true' : 'false') : undefined }));
440
440
  };
441
441
 
442
442
  var SnippylyCommentTool = function (props) {
@@ -4564,6 +4564,9 @@ function useCommentModeState() {
4564
4564
  }, [commentElement === null || commentElement === void 0 ? void 0 : commentElement.onCommentModeChange]);
4565
4565
  return data;
4566
4566
  }
4567
+ /**
4568
+ * @deprecated Use `useAddCommentAnnotation` event hook instead.
4569
+ */
4567
4570
  function useCommentAddHandler() {
4568
4571
  var commentElement = useCommentUtils();
4569
4572
  var _a = React__default["default"].useState(undefined), data = _a[0], setData = _a[1];
@@ -4579,6 +4582,9 @@ function useCommentAddHandler() {
4579
4582
  }, [commentElement === null || commentElement === void 0 ? void 0 : commentElement.onCommentAdd]);
4580
4583
  return data;
4581
4584
  }
4585
+ /**
4586
+ * @deprecated Use respective update events hooks instead.
4587
+ */
4582
4588
  function useCommentUpdateHandler() {
4583
4589
  var commentElement = useCommentUtils();
4584
4590
  var _a = React__default["default"].useState(undefined), data = _a[0], setData = _a[1];
@@ -4751,6 +4757,30 @@ function useRejectCommentAnnotation() {
4751
4757
  }
4752
4758
  };
4753
4759
  }
4760
+ function useSubscribeCommentAnnotation() {
4761
+ var commentElement = useCommentUtils();
4762
+ return {
4763
+ subscribeCommentAnnotation: function (config) {
4764
+ return new Promise(function (resolve, reject) {
4765
+ if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.subscribeCommentAnnotation))
4766
+ return reject(new Error('Velt SDK is not initialized.'));
4767
+ commentElement.subscribeCommentAnnotation(config).then(resolve).catch(reject);
4768
+ });
4769
+ }
4770
+ };
4771
+ }
4772
+ function useUnsubscribeCommentAnnotation() {
4773
+ var commentElement = useCommentUtils();
4774
+ return {
4775
+ unsubscribeCommentAnnotation: function (config) {
4776
+ return new Promise(function (resolve, reject) {
4777
+ if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.unsubscribeCommentAnnotation))
4778
+ return reject(new Error('Velt SDK is not initialized.'));
4779
+ commentElement.unsubscribeCommentAnnotation(config).then(resolve).catch(reject);
4780
+ });
4781
+ }
4782
+ };
4783
+ }
4754
4784
  function useDeleteCommentAnnotation() {
4755
4785
  var commentElement = useCommentUtils();
4756
4786
  return {
@@ -4763,6 +4793,18 @@ function useDeleteCommentAnnotation() {
4763
4793
  }
4764
4794
  };
4765
4795
  }
4796
+ function useAssignUser() {
4797
+ var commentElement = useCommentUtils();
4798
+ return {
4799
+ assignUser: function (config) {
4800
+ return new Promise(function (resolve, reject) {
4801
+ if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.assignUser))
4802
+ return reject(new Error('Velt SDK is not initialized.'));
4803
+ commentElement.assignUser(config).then(resolve).catch(reject);
4804
+ });
4805
+ }
4806
+ };
4807
+ }
4766
4808
  function useUpdatePriority() {
4767
4809
  var commentElement = useCommentUtils();
4768
4810
  return {
@@ -5721,6 +5763,7 @@ exports.useAddComment = useAddComment;
5721
5763
  exports.useAddCommentAnnotation = useAddCommentAnnotation;
5722
5764
  exports.useAddReaction = useAddReaction;
5723
5765
  exports.useApproveCommentAnnotation = useApproveCommentAnnotation;
5766
+ exports.useAssignUser = useAssignUser;
5724
5767
  exports.useAutocompleteChipClick = useAutocompleteChipClick;
5725
5768
  exports.useAutocompleteUtils = useAutocompleteUtils;
5726
5769
  exports.useClient = useClient;
@@ -5775,6 +5818,7 @@ exports.useSetDocument = useSetDocument;
5775
5818
  exports.useSetDocumentId = useSetDocumentId;
5776
5819
  exports.useSetLiveStateData = useSetLiveStateData;
5777
5820
  exports.useSetLocation = useSetLocation;
5821
+ exports.useSubscribeCommentAnnotation = useSubscribeCommentAnnotation;
5778
5822
  exports.useTagAnnotations = useTagAnnotations;
5779
5823
  exports.useTagUtils = useTagUtils;
5780
5824
  exports.useToggleReaction = useToggleReaction;
@@ -5787,6 +5831,7 @@ exports.useUnreadCommentCountByLocationId = useUnreadCommentCountByLocationId;
5787
5831
  exports.useUnreadCommentCountOnCurrentDocument = useUnreadCommentCountOnCurrentDocument;
5788
5832
  exports.useUnreadNotificationsCount = useUnreadNotificationsCount;
5789
5833
  exports.useUnsetDocumentId = useUnsetDocumentId;
5834
+ exports.useUnsubscribeCommentAnnotation = useUnsubscribeCommentAnnotation;
5790
5835
  exports.useUpdateAccess = useUpdateAccess;
5791
5836
  exports.useUpdateComment = useUpdateComment;
5792
5837
  exports.useUpdatePriority = useUpdatePriority;