@veltdev/react 1.0.114 → 1.0.115

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.
@@ -37,6 +37,7 @@ export interface IVeltCommentsSidebarProps {
37
37
  pageMode?: boolean;
38
38
  currentLocationSuffix?: boolean;
39
39
  variant?: string;
40
+ pageModeComposerVariant?: string;
40
41
  dialogVariant?: string;
41
42
  shadowDom?: boolean;
42
43
  filterConfig?: CommentSidebarFilterConfig;
package/esm/index.js CHANGED
@@ -276,7 +276,7 @@ var SnippylyComments = function (props) {
276
276
  };
277
277
 
278
278
  var SnippylyCommentsSidebar = function (props) {
279
- var embedMode = props.embedMode, enableUrlNavigation = props.enableUrlNavigation, urlNavigation = props.urlNavigation, pageMode = props.pageMode, currentLocationSuffix = props.currentLocationSuffix, filterConfig = props.filterConfig, groupConfig = props.groupConfig, filters = props.filters, variant = props.variant, dialogVariant = props.dialogVariant, shadowDom = props.shadowDom, openSidebar = props.openSidebar, onSidebarOpen = props.onSidebarOpen, onSidebarCommentClick = props.onSidebarCommentClick, onCommentClick = props.onCommentClick;
279
+ var embedMode = props.embedMode, enableUrlNavigation = props.enableUrlNavigation, urlNavigation = props.urlNavigation, pageMode = props.pageMode, currentLocationSuffix = props.currentLocationSuffix, filterConfig = props.filterConfig, groupConfig = props.groupConfig, filters = props.filters, variant = props.variant, pageModeComposerVariant = props.pageModeComposerVariant, dialogVariant = props.dialogVariant, shadowDom = props.shadowDom, openSidebar = props.openSidebar, onSidebarOpen = props.onSidebarOpen, onSidebarCommentClick = props.onSidebarCommentClick, onCommentClick = props.onCommentClick;
280
280
  var ref = useRef();
281
281
  useEffect(function () {
282
282
  if (ref.current) {
@@ -299,7 +299,7 @@ var SnippylyCommentsSidebar = function (props) {
299
299
  });
300
300
  }
301
301
  }, []);
302
- return (React.createElement("velt-comments-sidebar", { ref: ref, "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, "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, variant: variant, "dialog-variant": dialogVariant, "shadow-dom": [true, false].includes(shadowDom) ? (shadowDom ? 'true' : 'false') : undefined }));
302
+ return (React.createElement("velt-comments-sidebar", { ref: ref, "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, "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, variant: variant, "page-mode-composer-variant": pageModeComposerVariant, "dialog-variant": dialogVariant, "shadow-dom": [true, false].includes(shadowDom) ? (shadowDom ? 'true' : 'false') : undefined }));
303
303
  };
304
304
 
305
305
  var SnippylyCommentTool = function (props) {
@@ -722,17 +722,6 @@ var VeltNivoChartComments = function (_a) {
722
722
  }))));
723
723
  };
724
724
 
725
- var HighchartsReact;
726
- var Highcharts;
727
- // optionally import highcharts modules using try catch
728
- try {
729
- HighchartsReact = require('highcharts-react-official');
730
- Highcharts = require('highcharts');
731
- }
732
- catch (err) {
733
- HighchartsReact = null;
734
- Highcharts = null;
735
- }
736
725
  var VeltHighChartComments = function (_a) {
737
726
  var chartComputedData = _a.chartComputedData, id = _a.id, dialogMetadataTemplate = _a.dialogMetadataTemplate;
738
727
  var _b = useState([]), points = _b[0], setPoints = _b[1];
@@ -851,22 +840,10 @@ var VeltHighChartComments = function (_a) {
851
840
  if (chartRef.current && chartRef.current.chart) {
852
841
  var currentChart_1 = chartRef.current.chart;
853
842
  window.chart = currentChart_1;
854
- // Define the callback to execute on chart redraw
855
- var onRedraw_1 = function () {
856
- calculatePoints();
857
- filterGhostComments(commentsRef.current);
858
- };
859
- if (Highcharts) {
860
- // Attach the event listener
861
- Highcharts.addEvent(currentChart_1, 'redraw', onRedraw_1);
862
- }
863
843
  // Perform the initial calculation
864
844
  calculatePoints();
865
845
  // Clean up the event listener when the component unmounts or chart changes
866
846
  return function () {
867
- if (Highcharts) {
868
- Highcharts.removeEvent(currentChart_1, 'redraw', onRedraw_1);
869
- }
870
847
  };
871
848
  }
872
849
  }, [chartComputedData]);