@veltdev/react 1.0.115 → 1.0.116
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 +17 -5
- package/cjs/index.js.map +1 -1
- package/cjs/types/components/SnippylyCommentsSidebar/SnippylyCommentsSidebar.d.ts +1 -0
- package/cjs/types/components/VeltHighChartComments/VeltHighChartComments.d.ts +1 -0
- package/esm/index.js +17 -5
- package/esm/index.js.map +1 -1
- package/esm/types/components/SnippylyCommentsSidebar/SnippylyCommentsSidebar.d.ts +1 -0
- package/esm/types/components/VeltHighChartComments/VeltHighChartComments.d.ts +1 -0
- package/index.d.ts +2 -0
- package/package.json +1 -1
|
@@ -40,6 +40,7 @@ export interface IVeltCommentsSidebarProps {
|
|
|
40
40
|
pageModeComposerVariant?: string;
|
|
41
41
|
dialogVariant?: string;
|
|
42
42
|
shadowDom?: boolean;
|
|
43
|
+
sortData?: 'asc' | 'desc' | 'none';
|
|
43
44
|
filterConfig?: CommentSidebarFilterConfig;
|
|
44
45
|
groupConfig?: CommentSidebarGroupConfig;
|
|
45
46
|
filters?: CommentSidebarFilters;
|
package/esm/index.js
CHANGED
|
@@ -99,10 +99,10 @@ var loadVelt = function (callback, version, staging, develop, proxyDomain) {
|
|
|
99
99
|
if (!existingScript) {
|
|
100
100
|
var script = document.createElement('script');
|
|
101
101
|
if (staging) {
|
|
102
|
-
script.src = "https://us-central1-snipply-sdk-staging.cloudfunctions.net/
|
|
102
|
+
script.src = "https://us-central1-snipply-sdk-staging.cloudfunctions.net/getprivatenpmpackagefile?packageName=sdk-staging&packageVersion=".concat((!version || version === 'latest') ? '1.0.1' : version, "&filePath=velt.js&orgName=@veltdev");
|
|
103
103
|
}
|
|
104
104
|
else if (develop) {
|
|
105
|
-
script.src = "https://us-central1-snipply-sdk-staging.cloudfunctions.net/
|
|
105
|
+
script.src = "https://us-central1-snipply-sdk-staging.cloudfunctions.net/getprivatenpmpackagefile?packageName=sdk-dev&packageVersion=".concat((!version || version === 'latest') ? '1.0.1' : version, "&filePath=velt.js&orgName=@veltdev");
|
|
106
106
|
}
|
|
107
107
|
else {
|
|
108
108
|
if (proxyDomain) {
|
|
@@ -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, pageModeComposerVariant = props.pageModeComposerVariant, 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, sortData = props.sortData, 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, "page-mode-composer-variant": pageModeComposerVariant, "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, "sort-data": sortData, "shadow-dom": [true, false].includes(shadowDom) ? (shadowDom ? 'true' : 'false') : undefined }));
|
|
303
303
|
};
|
|
304
304
|
|
|
305
305
|
var SnippylyCommentTool = function (props) {
|
|
@@ -723,7 +723,7 @@ var VeltNivoChartComments = function (_a) {
|
|
|
723
723
|
};
|
|
724
724
|
|
|
725
725
|
var VeltHighChartComments = function (_a) {
|
|
726
|
-
var chartComputedData = _a.chartComputedData, id = _a.id, dialogMetadataTemplate = _a.dialogMetadataTemplate;
|
|
726
|
+
var chartComputedData = _a.chartComputedData, id = _a.id, dialogMetadataTemplate = _a.dialogMetadataTemplate, Highcharts = _a.Highcharts;
|
|
727
727
|
var _b = useState([]), points = _b[0], setPoints = _b[1];
|
|
728
728
|
var _c = useState([]), ghostPoints = _c[0], setGhostPoints = _c[1];
|
|
729
729
|
var chartRef = useRef(chartComputedData);
|
|
@@ -840,10 +840,22 @@ var VeltHighChartComments = function (_a) {
|
|
|
840
840
|
if (chartRef.current && chartRef.current.chart) {
|
|
841
841
|
var currentChart_1 = chartRef.current.chart;
|
|
842
842
|
window.chart = currentChart_1;
|
|
843
|
+
// Define the callback to execute on chart redraw
|
|
844
|
+
var onRedraw_1 = function () {
|
|
845
|
+
calculatePoints();
|
|
846
|
+
filterGhostComments(commentsRef.current);
|
|
847
|
+
};
|
|
848
|
+
if (Highcharts) {
|
|
849
|
+
// Attach the event listener
|
|
850
|
+
Highcharts.addEvent(currentChart_1, 'redraw', onRedraw_1);
|
|
851
|
+
}
|
|
843
852
|
// Perform the initial calculation
|
|
844
853
|
calculatePoints();
|
|
845
854
|
// Clean up the event listener when the component unmounts or chart changes
|
|
846
855
|
return function () {
|
|
856
|
+
if (Highcharts) {
|
|
857
|
+
Highcharts.removeEvent(currentChart_1, 'redraw', onRedraw_1);
|
|
858
|
+
}
|
|
847
859
|
};
|
|
848
860
|
}
|
|
849
861
|
}, [chartComputedData]);
|