@veltdev/react 1.0.150 → 1.0.152
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 +85 -5
- package/cjs/index.js.map +1 -1
- package/cjs/types/components/SnippylyCommentBubble/SnippylyCommentBubble.d.ts +1 -0
- package/cjs/types/components/VeltInlineCommentsSection/VeltInlineCommentsSection.d.ts +1 -0
- package/cjs/types/constants.d.ts +1 -1
- package/cjs/types/hooks/CommentElement.d.ts +15 -0
- package/cjs/types/hooks/index.d.ts +1 -1
- package/esm/index.js +81 -6
- package/esm/index.js.map +1 -1
- package/esm/types/components/SnippylyCommentBubble/SnippylyCommentBubble.d.ts +1 -0
- package/esm/types/components/VeltInlineCommentsSection/VeltInlineCommentsSection.d.ts +1 -0
- package/esm/types/constants.d.ts +1 -1
- package/esm/types/hooks/CommentElement.d.ts +15 -0
- package/esm/types/hooks/index.d.ts +1 -1
- package/index.d.ts +18 -1
- package/package.json +1 -1
|
@@ -10,6 +10,7 @@ export interface IVeltCommentBubbleProps extends React.DetailedHTMLProps<React.H
|
|
|
10
10
|
shadowDom?: boolean;
|
|
11
11
|
variant?: string;
|
|
12
12
|
darkMode?: boolean;
|
|
13
|
+
commentCountType?: 'total' | 'unread';
|
|
13
14
|
}
|
|
14
15
|
declare const SnippylyCommentBubble: React.FC<IVeltCommentBubbleProps>;
|
|
15
16
|
export default SnippylyCommentBubble;
|
package/cjs/types/constants.d.ts
CHANGED
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
import { CommentAnnotation, CommentElement, Location, CommentSelectionChangeData } from "@veltdev/types";
|
|
2
2
|
export declare function useCommentUtils(): CommentElement | undefined;
|
|
3
3
|
export declare function useCommentAnnotations(documentId?: string, location?: Location): CommentAnnotation[] | null;
|
|
4
|
+
export declare function useUnreadCommentCountByAnnotationId(annotationId: string): {
|
|
5
|
+
count: number;
|
|
6
|
+
} | null;
|
|
7
|
+
export declare function useUnreadCommentAnnotationCountOnCurrentDocument(): {
|
|
8
|
+
count: number;
|
|
9
|
+
} | null;
|
|
10
|
+
export declare function useUnreadCommentCountOnCurrentDocument(): {
|
|
11
|
+
count: number;
|
|
12
|
+
} | null;
|
|
13
|
+
export declare function useUnreadCommentCountByLocationId(locationId: string): {
|
|
14
|
+
count: number;
|
|
15
|
+
} | null;
|
|
16
|
+
export declare function useUnreadCommentAnnotationCountByLocationId(locationId: string): {
|
|
17
|
+
count: number;
|
|
18
|
+
} | null;
|
|
4
19
|
export declare function useCommentModeState(): boolean | undefined;
|
|
5
20
|
export declare function useCommentAddHandler(): any;
|
|
6
21
|
export declare function useCommentUpdateHandler(): any;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { useSetLocation, useSetDocumentId, useUnsetDocumentId, useIdentify, useClient, useVeltInitState, } from './Client';
|
|
2
|
-
export { useCommentUtils, useCommentAnnotations, useCommentAddHandler, useCommentModeState, useCommentUpdateHandler, useCommentDialogSidebarClickHandler, useCommentSelectionChangeHandler, } from './CommentElement';
|
|
2
|
+
export { useCommentUtils, useCommentAnnotations, useCommentAddHandler, useCommentModeState, useCommentUpdateHandler, useCommentDialogSidebarClickHandler, useCommentSelectionChangeHandler, useUnreadCommentCountByAnnotationId, useUnreadCommentAnnotationCountOnCurrentDocument, useUnreadCommentCountOnCurrentDocument, useUnreadCommentAnnotationCountByLocationId, useUnreadCommentCountByLocationId, } from './CommentElement';
|
|
3
3
|
export { useCursorUtils, useCursorUsers, } from './CursorElement';
|
|
4
4
|
export { useHuddleUtils, } from './HuddleElement';
|
|
5
5
|
export { useLiveStateSyncUtils, useLiveStateData, useSetLiveStateData, useUserEditorState, useEditor, useEditorAccessTimer, useEditorAccessRequestHandler, useServerConnectionStateChangeHandler, useLiveState, } from './LiveStateSyncElement';
|
package/esm/index.js
CHANGED
|
@@ -132,7 +132,7 @@ var loadVelt = function (callback, version, staging, develop, proxyDomain) {
|
|
|
132
132
|
}
|
|
133
133
|
};
|
|
134
134
|
|
|
135
|
-
var VELT_SDK_VERSION = '1.0.
|
|
135
|
+
var VELT_SDK_VERSION = '1.0.169';
|
|
136
136
|
var VELT_SDK_INIT_EVENT = 'onVeltInit';
|
|
137
137
|
var VELT_TAB_ID = 'veltTabId';
|
|
138
138
|
|
|
@@ -221,8 +221,8 @@ var SnippylyProvider = function (props) {
|
|
|
221
221
|
};
|
|
222
222
|
|
|
223
223
|
var SnippylyCommentBubble = function (props) {
|
|
224
|
-
var targetCommentElementId = props.targetCommentElementId, avatar = props.avatar, showAvatar = props.showAvatar, commentBubbleTargetPinHover = props.commentBubbleTargetPinHover, children = props.children, shadowDom = props.shadowDom, variant = props.variant, darkMode = props.darkMode;
|
|
225
|
-
return (React.createElement("velt-comment-bubble", { "target-comment-element-id": targetCommentElementId, "show-avatar": [true, false].includes(showAvatar) ? (showAvatar ? 'true' : 'false') : undefined, avatar: [true, false].includes(avatar) ? (avatar ? 'true' : 'false') : undefined, "comment-bubble-target-pin-hover": commentBubbleTargetPinHover ? 'true' : undefined, "shadow-dom": [true, false].includes(shadowDom) ? (shadowDom ? 'true' : 'false') : undefined, "dark-mode": [true, false].includes(darkMode) ? (darkMode ? 'true' : 'false') : undefined, variant: variant }, children));
|
|
224
|
+
var targetCommentElementId = props.targetCommentElementId, avatar = props.avatar, showAvatar = props.showAvatar, commentBubbleTargetPinHover = props.commentBubbleTargetPinHover, children = props.children, shadowDom = props.shadowDom, variant = props.variant, darkMode = props.darkMode, commentCountType = props.commentCountType;
|
|
225
|
+
return (React.createElement("velt-comment-bubble", { "comment-count-type": commentCountType, "target-comment-element-id": targetCommentElementId, "show-avatar": [true, false].includes(showAvatar) ? (showAvatar ? 'true' : 'false') : undefined, avatar: [true, false].includes(avatar) ? (avatar ? 'true' : 'false') : undefined, "comment-bubble-target-pin-hover": commentBubbleTargetPinHover ? 'true' : undefined, "shadow-dom": [true, false].includes(shadowDom) ? (shadowDom ? 'true' : 'false') : undefined, "dark-mode": [true, false].includes(darkMode) ? (darkMode ? 'true' : 'false') : undefined, variant: variant }, children));
|
|
226
226
|
};
|
|
227
227
|
|
|
228
228
|
var SnippylyComments = function (props) {
|
|
@@ -1121,8 +1121,8 @@ var VeltAutocomplete = function (props) {
|
|
|
1121
1121
|
};
|
|
1122
1122
|
|
|
1123
1123
|
var VeltInlineCommentsSection = function (props) {
|
|
1124
|
-
var config = props.config, children = props.children, darkMode = props.darkMode, variant = props.variant, shadowDom = props.shadowDom, dialogVariant = props.dialogVariant;
|
|
1125
|
-
return (React.createElement("velt-inline-comments-section", { config: JSON.stringify(config), variant: variant, "dialog-variant": dialogVariant, "shadow-dom": [true, false].includes(shadowDom) ? (shadowDom ? 'true' : 'false') : undefined, "dark-mode": [true, false].includes(darkMode) ? (darkMode ? 'true' : 'false') : undefined }, children));
|
|
1124
|
+
var config = props.config, children = props.children, darkMode = props.darkMode, variant = props.variant, shadowDom = props.shadowDom, dialogVariant = props.dialogVariant, targetInlineCommentElementId = props.targetInlineCommentElementId;
|
|
1125
|
+
return (React.createElement("velt-inline-comments-section", { "target-inline-comment-element-id": targetInlineCommentElementId, config: JSON.stringify(config), variant: variant, "dialog-variant": dialogVariant, "shadow-dom": [true, false].includes(shadowDom) ? (shadowDom ? 'true' : 'false') : undefined, "dark-mode": [true, false].includes(darkMode) ? (darkMode ? 'true' : 'false') : undefined }, children));
|
|
1126
1126
|
};
|
|
1127
1127
|
|
|
1128
1128
|
var VeltWireframe = function (props) {
|
|
@@ -2414,6 +2414,81 @@ function useCommentAnnotations(documentId, location) {
|
|
|
2414
2414
|
}, [commentElement === null || commentElement === void 0 ? void 0 : commentElement.getAllCommentAnnotations]);
|
|
2415
2415
|
return data;
|
|
2416
2416
|
}
|
|
2417
|
+
function useUnreadCommentCountByAnnotationId(annotationId) {
|
|
2418
|
+
var commentElement = useCommentUtils();
|
|
2419
|
+
var _a = React.useState({ count: 0 }), data = _a[0], setData = _a[1];
|
|
2420
|
+
useEffect(function () {
|
|
2421
|
+
if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.getUnreadCommentCountByAnnotationId))
|
|
2422
|
+
return;
|
|
2423
|
+
var subscription = commentElement.getUnreadCommentCountByAnnotationId(annotationId).subscribe(function (res) {
|
|
2424
|
+
setData(res);
|
|
2425
|
+
});
|
|
2426
|
+
return function () {
|
|
2427
|
+
subscription.unsubscribe();
|
|
2428
|
+
};
|
|
2429
|
+
}, [commentElement === null || commentElement === void 0 ? void 0 : commentElement.getUnreadCommentCountByAnnotationId]);
|
|
2430
|
+
return data;
|
|
2431
|
+
}
|
|
2432
|
+
function useUnreadCommentAnnotationCountOnCurrentDocument() {
|
|
2433
|
+
var commentElement = useCommentUtils();
|
|
2434
|
+
var _a = React.useState({ count: 0 }), data = _a[0], setData = _a[1];
|
|
2435
|
+
useEffect(function () {
|
|
2436
|
+
if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.getUnreadCommentAnnotationCountOnCurrentDocument))
|
|
2437
|
+
return;
|
|
2438
|
+
var subscription = commentElement.getUnreadCommentAnnotationCountOnCurrentDocument().subscribe(function (res) {
|
|
2439
|
+
setData(res);
|
|
2440
|
+
});
|
|
2441
|
+
return function () {
|
|
2442
|
+
subscription.unsubscribe();
|
|
2443
|
+
};
|
|
2444
|
+
}, [commentElement === null || commentElement === void 0 ? void 0 : commentElement.getUnreadCommentAnnotationCountOnCurrentDocument]);
|
|
2445
|
+
return data;
|
|
2446
|
+
}
|
|
2447
|
+
function useUnreadCommentCountOnCurrentDocument() {
|
|
2448
|
+
var commentElement = useCommentUtils();
|
|
2449
|
+
var _a = React.useState({ count: 0 }), data = _a[0], setData = _a[1];
|
|
2450
|
+
useEffect(function () {
|
|
2451
|
+
if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.getUnreadCommentCountOnCurrentDocument))
|
|
2452
|
+
return;
|
|
2453
|
+
var subscription = commentElement.getUnreadCommentCountOnCurrentDocument().subscribe(function (res) {
|
|
2454
|
+
setData(res);
|
|
2455
|
+
});
|
|
2456
|
+
return function () {
|
|
2457
|
+
subscription.unsubscribe();
|
|
2458
|
+
};
|
|
2459
|
+
}, [commentElement === null || commentElement === void 0 ? void 0 : commentElement.getUnreadCommentCountOnCurrentDocument]);
|
|
2460
|
+
return data;
|
|
2461
|
+
}
|
|
2462
|
+
function useUnreadCommentCountByLocationId(locationId) {
|
|
2463
|
+
var commentElement = useCommentUtils();
|
|
2464
|
+
var _a = React.useState({ count: 0 }), data = _a[0], setData = _a[1];
|
|
2465
|
+
useEffect(function () {
|
|
2466
|
+
if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.getUnreadCommentCountByLocationId))
|
|
2467
|
+
return;
|
|
2468
|
+
var subscription = commentElement.getUnreadCommentCountByLocationId(locationId).subscribe(function (res) {
|
|
2469
|
+
setData(res);
|
|
2470
|
+
});
|
|
2471
|
+
return function () {
|
|
2472
|
+
subscription.unsubscribe();
|
|
2473
|
+
};
|
|
2474
|
+
}, [commentElement === null || commentElement === void 0 ? void 0 : commentElement.getUnreadCommentCountByLocationId]);
|
|
2475
|
+
return data;
|
|
2476
|
+
}
|
|
2477
|
+
function useUnreadCommentAnnotationCountByLocationId(locationId) {
|
|
2478
|
+
var commentElement = useCommentUtils();
|
|
2479
|
+
var _a = React.useState({ count: 0 }), data = _a[0], setData = _a[1];
|
|
2480
|
+
useEffect(function () {
|
|
2481
|
+
if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.getUnreadCommentAnnotationCountByLocationId))
|
|
2482
|
+
return;
|
|
2483
|
+
var subscription = commentElement.getUnreadCommentAnnotationCountByLocationId(locationId).subscribe(function (res) {
|
|
2484
|
+
setData(res);
|
|
2485
|
+
});
|
|
2486
|
+
return function () {
|
|
2487
|
+
subscription.unsubscribe();
|
|
2488
|
+
};
|
|
2489
|
+
}, [commentElement === null || commentElement === void 0 ? void 0 : commentElement.getUnreadCommentAnnotationCountByLocationId]);
|
|
2490
|
+
return data;
|
|
2491
|
+
}
|
|
2417
2492
|
function useCommentModeState() {
|
|
2418
2493
|
var commentElement = useCommentUtils();
|
|
2419
2494
|
var _a = React.useState(), data = _a[0], setData = _a[1];
|
|
@@ -3000,5 +3075,5 @@ var logLiveState = function (action, liveStateDataId) {
|
|
|
3000
3075
|
}
|
|
3001
3076
|
};
|
|
3002
3077
|
|
|
3003
|
-
export { SnippylyArrowTool as VeltArrowTool, SnippylyArrows as VeltArrows, VeltAutocomplete, VeltAutocompleteChipTooltipWireframe, VeltAutocompleteOptionWireframe, VeltChartComment, SnippylyCommentBubble as VeltCommentBubble, VeltCommentBubbleWireframe, VeltCommentDialogOptionsDropdownContentWireframe, VeltCommentDialogOptionsDropdownTriggerWireframe, VeltCommentDialogPriorityDropdownContentWireframe, VeltCommentDialogPriorityDropdownTriggerWireframe, VeltCommentDialogStatusDropdownContentWireframe, VeltCommentDialogStatusDropdownTriggerWireframe, VeltCommentDialogWireframe, VeltCommentPinWireframe, VeltCommentPlayerTimeline, VeltCommentThread, SnippylyCommentTool as VeltCommentTool, VeltCommentToolWireframe, SnippylyComments as VeltComments, SnippylyCommentsSidebar as VeltCommentsSidebar, VeltCommentsSidebarStatusDropdownWireframe, VeltCommentsSidebarWireframe, SnippylyCursor as VeltCursor, VeltHighChartComments, SnippylyHuddle as VeltHuddle, SnippylyHuddleTool as VeltHuddleTool, VeltInlineCommentsSection, VeltInlineCommentsSectionWireframe, VeltNivoChartComments, VeltNotificationsHistoryPanel, VeltNotificationsPanel, VeltNotificationsTool, SnippylyPresence as VeltPresence, SnippylyProvider as VeltProvider, VeltReactionPinTooltipWireframe, VeltReactionPinWireframe, VeltReactionToolWireframe, VeltReactionsPanelWireframe, SnippylyRecorderControlPanel as VeltRecorderControlPanel, SnippylyRecorderNotes as VeltRecorderNotes, SnippylyRecorderPlayer as VeltRecorderPlayer, SnippylyRecorderTool as VeltRecorderTool, SnippylySidebarButton as VeltSidebarButton, VeltSidebarButtonWireframe, SnippylyTagTool as VeltTagTool, SnippylyTags as VeltTags, VeltTextCommentToolWireframe, VeltTextCommentToolbar as VeltTextCommentToolbarWireframe, SnippylyUserInviteTool as VeltUserInviteTool, SnippylyUserRequestTool as VeltUserRequestTool, VeltUserSelectorDropdown as VeltUserSelectorDropdownWireframe, VeltVideoPlayer, VeltViewAnalytics, VeltWireframe, createLiveStateMiddleware, useAIRewriterUtils, useAutocompleteChipClick, useAutocompleteUtils, useClient, useCommentAddHandler, useCommentAnnotations, useCommentDialogSidebarClickHandler, useCommentModeState, useCommentSelectionChangeHandler, useCommentUpdateHandler, useCommentUtils, useCursorUsers, useCursorUtils, useEditor, useEditorAccessRequestHandler, useEditorAccessTimer, useHuddleUtils, useIdentify, useLiveSelectionUtils, useLiveState, useLiveStateData, useLiveStateSyncUtils, useNotificationUtils, useNotificationsData, usePresenceUsers, usePresenceUtils, useRecorderAddHandler, useRecorderUtils, useServerConnectionStateChangeHandler, useSetDocumentId, useSetLiveStateData, useSetLocation, useTagAnnotations, useTagUtils, useUniqueViewsByDate, useUniqueViewsByUser, useUnsetDocumentId, useUserEditorState, useVeltClient, useVeltInitState, useViewsUtils };
|
|
3078
|
+
export { SnippylyArrowTool as VeltArrowTool, SnippylyArrows as VeltArrows, VeltAutocomplete, VeltAutocompleteChipTooltipWireframe, VeltAutocompleteOptionWireframe, VeltChartComment, SnippylyCommentBubble as VeltCommentBubble, VeltCommentBubbleWireframe, VeltCommentDialogOptionsDropdownContentWireframe, VeltCommentDialogOptionsDropdownTriggerWireframe, VeltCommentDialogPriorityDropdownContentWireframe, VeltCommentDialogPriorityDropdownTriggerWireframe, VeltCommentDialogStatusDropdownContentWireframe, VeltCommentDialogStatusDropdownTriggerWireframe, VeltCommentDialogWireframe, VeltCommentPinWireframe, VeltCommentPlayerTimeline, VeltCommentThread, SnippylyCommentTool as VeltCommentTool, VeltCommentToolWireframe, SnippylyComments as VeltComments, SnippylyCommentsSidebar as VeltCommentsSidebar, VeltCommentsSidebarStatusDropdownWireframe, VeltCommentsSidebarWireframe, SnippylyCursor as VeltCursor, VeltHighChartComments, SnippylyHuddle as VeltHuddle, SnippylyHuddleTool as VeltHuddleTool, VeltInlineCommentsSection, VeltInlineCommentsSectionWireframe, VeltNivoChartComments, VeltNotificationsHistoryPanel, VeltNotificationsPanel, VeltNotificationsTool, SnippylyPresence as VeltPresence, SnippylyProvider as VeltProvider, VeltReactionPinTooltipWireframe, VeltReactionPinWireframe, VeltReactionToolWireframe, VeltReactionsPanelWireframe, SnippylyRecorderControlPanel as VeltRecorderControlPanel, SnippylyRecorderNotes as VeltRecorderNotes, SnippylyRecorderPlayer as VeltRecorderPlayer, SnippylyRecorderTool as VeltRecorderTool, SnippylySidebarButton as VeltSidebarButton, VeltSidebarButtonWireframe, SnippylyTagTool as VeltTagTool, SnippylyTags as VeltTags, VeltTextCommentToolWireframe, VeltTextCommentToolbar as VeltTextCommentToolbarWireframe, SnippylyUserInviteTool as VeltUserInviteTool, SnippylyUserRequestTool as VeltUserRequestTool, VeltUserSelectorDropdown as VeltUserSelectorDropdownWireframe, VeltVideoPlayer, VeltViewAnalytics, VeltWireframe, createLiveStateMiddleware, useAIRewriterUtils, useAutocompleteChipClick, useAutocompleteUtils, useClient, useCommentAddHandler, useCommentAnnotations, useCommentDialogSidebarClickHandler, useCommentModeState, useCommentSelectionChangeHandler, useCommentUpdateHandler, useCommentUtils, useCursorUsers, useCursorUtils, useEditor, useEditorAccessRequestHandler, useEditorAccessTimer, useHuddleUtils, useIdentify, useLiveSelectionUtils, useLiveState, useLiveStateData, useLiveStateSyncUtils, useNotificationUtils, useNotificationsData, usePresenceUsers, usePresenceUtils, useRecorderAddHandler, useRecorderUtils, useServerConnectionStateChangeHandler, useSetDocumentId, useSetLiveStateData, useSetLocation, useTagAnnotations, useTagUtils, useUniqueViewsByDate, useUniqueViewsByUser, useUnreadCommentAnnotationCountByLocationId, useUnreadCommentAnnotationCountOnCurrentDocument, useUnreadCommentCountByAnnotationId, useUnreadCommentCountByLocationId, useUnreadCommentCountOnCurrentDocument, useUnsetDocumentId, useUserEditorState, useVeltClient, useVeltInitState, useViewsUtils };
|
|
3004
3079
|
//# sourceMappingURL=index.js.map
|