@veltdev/react 1.0.115 → 1.0.117

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.
Files changed (20) hide show
  1. package/cjs/index.js +23 -5
  2. package/cjs/index.js.map +1 -1
  3. package/cjs/types/components/SnippylyCommentsSidebar/SnippylyCommentsSidebar.d.ts +1 -0
  4. package/cjs/types/components/VeltCommentBubble/VeltCommentBubbleWireframe.d.ts +12 -0
  5. package/cjs/types/components/VeltCommentBubble/index.d.ts +1 -0
  6. package/cjs/types/components/VeltCommentDialogWireframe/VeltCommentDialogAssigneeBanner/VeltCommentDialogAssigneeBanner.d.ts +3 -2
  7. package/cjs/types/components/VeltCommentDialogWireframe/VeltCommentDialogSuggestionAction/VeltCommentDialogSuggestionAction.d.ts +3 -2
  8. package/cjs/types/components/VeltCommentDialogWireframe/VeltCommentDialogWireframe.d.ts +2 -0
  9. package/cjs/types/components/VeltHighChartComments/VeltHighChartComments.d.ts +1 -0
  10. package/esm/index.js +23 -5
  11. package/esm/index.js.map +1 -1
  12. package/esm/types/components/SnippylyCommentsSidebar/SnippylyCommentsSidebar.d.ts +1 -0
  13. package/esm/types/components/VeltCommentBubble/VeltCommentBubbleWireframe.d.ts +12 -0
  14. package/esm/types/components/VeltCommentBubble/index.d.ts +1 -0
  15. package/esm/types/components/VeltCommentDialogWireframe/VeltCommentDialogAssigneeBanner/VeltCommentDialogAssigneeBanner.d.ts +3 -2
  16. package/esm/types/components/VeltCommentDialogWireframe/VeltCommentDialogSuggestionAction/VeltCommentDialogSuggestionAction.d.ts +3 -2
  17. package/esm/types/components/VeltCommentDialogWireframe/VeltCommentDialogWireframe.d.ts +2 -0
  18. package/esm/types/components/VeltHighChartComments/VeltHighChartComments.d.ts +1 -0
  19. package/index.d.ts +6 -0
  20. 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;
@@ -0,0 +1,12 @@
1
+ import React from "react";
2
+ import { IVeltCommentBubbleAvatarProps } from "./VeltCommentBubbleAvatar/VeltCommentBubbleAvatar";
3
+ import { IVeltCommentBubbleCommentsCountProps } from "./VeltCommentBubbleCommentsCount/VeltCommentBubbleCommentsCount";
4
+ export interface IVeltCommentBubbleWireframeProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> {
5
+ variant?: string;
6
+ }
7
+ export interface IVeltCommentBubbleWireframe extends React.FC<IVeltCommentBubbleWireframeProps> {
8
+ Avatar: React.FC<IVeltCommentBubbleAvatarProps>;
9
+ CommentsCount: React.FC<IVeltCommentBubbleCommentsCountProps>;
10
+ }
11
+ declare const VeltCommentBubbleWireframe: IVeltCommentBubbleWireframe;
12
+ export default VeltCommentBubbleWireframe;
@@ -0,0 +1 @@
1
+ export { default } from "./VeltCommentBubbleWireframe";
@@ -4,9 +4,10 @@ import { IVeltCommentDialogAssigneeBannerUserAvatarProps } from "./VeltCommentDi
4
4
  import { IVeltCommentDialogAssigneeBannerUserNameProps } from "./VeltCommentDialogAssigneeBannerUserName/VeltCommentDialogAssigneeBannerUserName";
5
5
  export interface IVeltCommentDialogAssigneeBannerProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> {
6
6
  }
7
- declare const VeltCommentDialogAssigneeBanner: React.FC<IVeltCommentDialogAssigneeBannerProps> & {
7
+ export interface IVeltCommentDialogAssigneeBanner extends React.FC<IVeltCommentDialogAssigneeBannerProps> {
8
8
  ResolveButton: React.FC<IVeltCommentDialogAssigneeBannerResolveButtonProps>;
9
9
  UserAvatar: React.FC<IVeltCommentDialogAssigneeBannerUserAvatarProps>;
10
10
  UserName: React.FC<IVeltCommentDialogAssigneeBannerUserNameProps>;
11
- };
11
+ }
12
+ declare const VeltCommentDialogAssigneeBanner: IVeltCommentDialogAssigneeBanner;
12
13
  export default VeltCommentDialogAssigneeBanner;
@@ -3,8 +3,9 @@ import { IVeltCommentDialogSuggestionActionAcceptProps } from "./VeltCommentDial
3
3
  import { IVeltCommentDialogSuggestionActionRejectProps } from "./VeltCommentDialogSuggestionActionReject/VeltCommentDialogSuggestionActionReject";
4
4
  export interface IVeltCommentDialogSuggestionActionProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> {
5
5
  }
6
- declare const VeltCommentDialogSuggestionAction: React.FC<IVeltCommentDialogSuggestionActionProps> & {
6
+ export interface IVeltCommentDialogSuggestionAction extends React.FC<IVeltCommentDialogSuggestionActionProps> {
7
7
  Accept: React.FC<IVeltCommentDialogSuggestionActionAcceptProps>;
8
8
  Reject: React.FC<IVeltCommentDialogSuggestionActionRejectProps>;
9
- };
9
+ }
10
+ declare const VeltCommentDialogSuggestionAction: IVeltCommentDialogSuggestionAction;
10
11
  export default VeltCommentDialogSuggestionAction;
@@ -23,6 +23,7 @@ import { IVeltCommentDialogThreadsProps } from "./VeltCommentDialogThreads/VeltC
23
23
  import { IVeltCommentDialogToggleReplyProps } from "./VeltCommentDialogToggleReply/VeltCommentDialogToggleReply";
24
24
  import { IVeltCommentDialogUpgradeProps } from "./VeltCommentDialogUpgrade/VeltCommentDialogUpgrade";
25
25
  import { IVeltCommentDialogSuggestionActionProps } from "./VeltCommentDialogSuggestionAction/VeltCommentDialogSuggestionAction";
26
+ import { IVeltCommentDialogPrivateBadgeProps } from "./VeltCommentDialogPrivateBadge/VeltCommentDialogPrivateBadge";
26
27
  export interface IVeltCommentDialogWireframeProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> {
27
28
  variant?: string;
28
29
  }
@@ -51,5 +52,6 @@ declare const VeltCommentDialogWireframe: React.FC<IVeltCommentDialogWireframePr
51
52
  Threads: React.FC<IVeltCommentDialogThreadsProps>;
52
53
  ToggleReply: React.FC<IVeltCommentDialogToggleReplyProps>;
53
54
  Upgrade: React.FC<IVeltCommentDialogUpgradeProps>;
55
+ PrivateBadge: React.FC<IVeltCommentDialogPrivateBadgeProps>;
54
56
  };
55
57
  export default VeltCommentDialogWireframe;
@@ -3,6 +3,7 @@ export interface IVeltHighChartCommentsProps {
3
3
  id: string;
4
4
  chartComputedData: any;
5
5
  dialogMetadataTemplate?: string[];
6
+ Highcharts?: any;
6
7
  }
7
8
  declare const VeltHighChartComments: React.FC<IVeltHighChartCommentsProps>;
8
9
  export default VeltHighChartComments;
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/getPrivateNpmPackageFile?packageName=sdk-staging&packageVersion=".concat((!version || version === 'latest') ? '1.0.1' : version, "&filePath=velt.js&orgName=@veltdev");
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/getPrivateNpmPackageFile?packageName=sdk-dev&packageVersion=".concat((!version || version === 'latest') ? '1.0.1' : version, "&filePath=velt.js&orgName=@veltdev");
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]);
@@ -1229,6 +1241,11 @@ var VeltCommentDialogSuggestionAction = function (props) {
1229
1241
  VeltCommentDialogSuggestionAction.Accept = VeltCommentDialogSuggestionActionAccept;
1230
1242
  VeltCommentDialogSuggestionAction.Reject = VeltCommentDialogSuggestionActionReject;
1231
1243
 
1244
+ var VeltCommentDialogPrivateBadge = function (props) {
1245
+ var children = props.children;
1246
+ return (React.createElement("velt-comment-dialog-private-badge-wireframe", null, children));
1247
+ };
1248
+
1232
1249
  var VeltCommentDialogWireframe = function (props) {
1233
1250
  var children = props.children, remainingProp = __rest(props, ["children"]);
1234
1251
  return (React.createElement("velt-comment-dialog-wireframe", __assign({}, remainingProp), children));
@@ -1257,6 +1274,7 @@ VeltCommentDialogWireframe.ThreadCard = VeltCommentDialogThreadCard;
1257
1274
  VeltCommentDialogWireframe.Threads = VeltCommentDialogThreads;
1258
1275
  VeltCommentDialogWireframe.ToggleReply = VeltCommentDialogToggleReply;
1259
1276
  VeltCommentDialogWireframe.Upgrade = VeltCommentDialogUpgrade;
1277
+ VeltCommentDialogWireframe.PrivateBadge = VeltCommentDialogPrivateBadge;
1260
1278
 
1261
1279
  var VeltCommentsSidebarCloseButton = function (props) {
1262
1280
  var children = props.children;