@veltdev/react 1.0.157 → 1.0.159
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 +30 -1
- package/cjs/index.js.map +1 -1
- package/cjs/types/constants.d.ts +1 -1
- package/cjs/types/hooks/ContactElement.d.ts +3 -0
- package/cjs/types/hooks/index.d.ts +1 -0
- package/esm/index.js +29 -2
- package/esm/index.js.map +1 -1
- package/esm/types/constants.d.ts +1 -1
- package/esm/types/hooks/ContactElement.d.ts +3 -0
- package/esm/types/hooks/index.d.ts +1 -0
- package/index.d.ts +5 -2
- package/package.json +1 -1
package/cjs/types/constants.d.ts
CHANGED
|
@@ -11,3 +11,4 @@ export { useTagUtils, useTagAnnotations, } from './TagElement';
|
|
|
11
11
|
export { useViewsUtils, useUniqueViewsByDate, useUniqueViewsByUser, } from './ViewsElement';
|
|
12
12
|
export { useNotificationUtils, useNotificationsData, } from './NotificationElement';
|
|
13
13
|
export { useAutocompleteUtils, useAutocompleteChipClick, } from './AutocompleteElement';
|
|
14
|
+
export { useContactUtils, useContactSelected, } from './ContactElement';
|
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.177';
|
|
136
136
|
var VELT_SDK_INIT_EVENT = 'onVeltInit';
|
|
137
137
|
var VELT_TAB_ID = 'veltTabId';
|
|
138
138
|
|
|
@@ -2984,6 +2984,33 @@ function useAutocompleteChipClick() {
|
|
|
2984
2984
|
return data;
|
|
2985
2985
|
}
|
|
2986
2986
|
|
|
2987
|
+
function useContactUtils() {
|
|
2988
|
+
var _a = React.useState(), contactElement = _a[0], setContactElement = _a[1];
|
|
2989
|
+
var client = useVeltClient().client;
|
|
2990
|
+
React.useEffect(function () {
|
|
2991
|
+
if (!client || contactElement)
|
|
2992
|
+
return;
|
|
2993
|
+
var loadedContactElement = client.getContactElement();
|
|
2994
|
+
setContactElement(loadedContactElement);
|
|
2995
|
+
}, [client, setContactElement, contactElement]);
|
|
2996
|
+
return contactElement;
|
|
2997
|
+
}
|
|
2998
|
+
function useContactSelected() {
|
|
2999
|
+
var contactElement = useContactUtils();
|
|
3000
|
+
var _a = React.useState(), data = _a[0], setData = _a[1];
|
|
3001
|
+
useEffect(function () {
|
|
3002
|
+
if (!contactElement)
|
|
3003
|
+
return;
|
|
3004
|
+
var subscription = contactElement.onContactSelected().subscribe(function (res) {
|
|
3005
|
+
setData(res);
|
|
3006
|
+
});
|
|
3007
|
+
return function () {
|
|
3008
|
+
subscription.unsubscribe();
|
|
3009
|
+
};
|
|
3010
|
+
}, [contactElement === null || contactElement === void 0 ? void 0 : contactElement.onContactSelected]);
|
|
3011
|
+
return data;
|
|
3012
|
+
}
|
|
3013
|
+
|
|
2987
3014
|
var sessionId = Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);
|
|
2988
3015
|
var getSessionId = function () {
|
|
2989
3016
|
return (sessionStorage === null || sessionStorage === void 0 ? void 0 : sessionStorage.getItem(VELT_TAB_ID)) || sessionId;
|
|
@@ -3075,5 +3102,5 @@ var logLiveState = function (action, liveStateDataId) {
|
|
|
3075
3102
|
}
|
|
3076
3103
|
};
|
|
3077
3104
|
|
|
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 };
|
|
3105
|
+
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, useContactSelected, useContactUtils, 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 };
|
|
3079
3106
|
//# sourceMappingURL=index.js.map
|