@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.
- package/cjs/index.js +2 -25
- package/cjs/index.js.map +1 -1
- package/cjs/types/components/SnippylyCommentsSidebar/SnippylyCommentsSidebar.d.ts +1 -0
- package/esm/index.js +2 -25
- package/esm/index.js.map +1 -1
- package/esm/types/components/SnippylyCommentsSidebar/SnippylyCommentsSidebar.d.ts +1 -0
- package/index.d.ts +1 -0
- package/package.json +1 -1
package/cjs/index.js
CHANGED
|
@@ -284,7 +284,7 @@ var SnippylyComments = function (props) {
|
|
|
284
284
|
};
|
|
285
285
|
|
|
286
286
|
var SnippylyCommentsSidebar = function (props) {
|
|
287
|
-
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;
|
|
287
|
+
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;
|
|
288
288
|
var ref = React.useRef();
|
|
289
289
|
React.useEffect(function () {
|
|
290
290
|
if (ref.current) {
|
|
@@ -307,7 +307,7 @@ var SnippylyCommentsSidebar = function (props) {
|
|
|
307
307
|
});
|
|
308
308
|
}
|
|
309
309
|
}, []);
|
|
310
|
-
return (React__default["default"].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 }));
|
|
310
|
+
return (React__default["default"].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 }));
|
|
311
311
|
};
|
|
312
312
|
|
|
313
313
|
var SnippylyCommentTool = function (props) {
|
|
@@ -730,17 +730,6 @@ var VeltNivoChartComments = function (_a) {
|
|
|
730
730
|
}))));
|
|
731
731
|
};
|
|
732
732
|
|
|
733
|
-
var HighchartsReact;
|
|
734
|
-
var Highcharts;
|
|
735
|
-
// optionally import highcharts modules using try catch
|
|
736
|
-
try {
|
|
737
|
-
HighchartsReact = require('highcharts-react-official');
|
|
738
|
-
Highcharts = require('highcharts');
|
|
739
|
-
}
|
|
740
|
-
catch (err) {
|
|
741
|
-
HighchartsReact = null;
|
|
742
|
-
Highcharts = null;
|
|
743
|
-
}
|
|
744
733
|
var VeltHighChartComments = function (_a) {
|
|
745
734
|
var chartComputedData = _a.chartComputedData, id = _a.id, dialogMetadataTemplate = _a.dialogMetadataTemplate;
|
|
746
735
|
var _b = React.useState([]), points = _b[0], setPoints = _b[1];
|
|
@@ -859,22 +848,10 @@ var VeltHighChartComments = function (_a) {
|
|
|
859
848
|
if (chartRef.current && chartRef.current.chart) {
|
|
860
849
|
var currentChart_1 = chartRef.current.chart;
|
|
861
850
|
window.chart = currentChart_1;
|
|
862
|
-
// Define the callback to execute on chart redraw
|
|
863
|
-
var onRedraw_1 = function () {
|
|
864
|
-
calculatePoints();
|
|
865
|
-
filterGhostComments(commentsRef.current);
|
|
866
|
-
};
|
|
867
|
-
if (Highcharts) {
|
|
868
|
-
// Attach the event listener
|
|
869
|
-
Highcharts.addEvent(currentChart_1, 'redraw', onRedraw_1);
|
|
870
|
-
}
|
|
871
851
|
// Perform the initial calculation
|
|
872
852
|
calculatePoints();
|
|
873
853
|
// Clean up the event listener when the component unmounts or chart changes
|
|
874
854
|
return function () {
|
|
875
|
-
if (Highcharts) {
|
|
876
|
-
Highcharts.removeEvent(currentChart_1, 'redraw', onRedraw_1);
|
|
877
|
-
}
|
|
878
855
|
};
|
|
879
856
|
}
|
|
880
857
|
}, [chartComputedData]);
|