@veltdev/react 4.5.0-beta.29 → 4.5.0-beta.30
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 +44 -2
- package/cjs/index.js.map +1 -1
- package/cjs/types/constants.d.ts +1 -1
- package/cjs/types/hooks/NotificationElement.d.ts +6 -1
- package/cjs/types/hooks/index.d.ts +1 -1
- package/esm/index.js +44 -3
- package/esm/index.js.map +1 -1
- package/esm/types/constants.d.ts +1 -1
- package/esm/types/hooks/NotificationElement.d.ts +6 -1
- package/esm/types/hooks/index.d.ts +1 -1
- package/index.d.ts +7 -2
- package/package.json +1 -1
package/cjs/types/constants.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const VELT_SDK_VERSION = "4.5.0-beta.
|
|
2
|
+
export declare const VELT_SDK_VERSION = "4.5.0-beta.30";
|
|
3
3
|
export declare const VELT_SDK_INIT_EVENT = "onVeltInit";
|
|
4
4
|
export declare const VELT_TAB_ID = "veltTabId";
|
|
5
5
|
export declare const INTEGRITY_MAP: Record<string, string>;
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
import { Notification, NotificationElement } from "@veltdev/types";
|
|
1
|
+
import { Notification, NotificationElement, NotificationInitialSettingsConfig, NotificationSettingsConfig } from "@veltdev/types";
|
|
2
2
|
export declare function useNotificationUtils(): NotificationElement | undefined;
|
|
3
3
|
export declare function useNotificationsData(): Notification[] | null;
|
|
4
4
|
export declare function useUnreadNotificationsCount(): {
|
|
5
5
|
forYou: number | null;
|
|
6
6
|
all: number | null;
|
|
7
7
|
};
|
|
8
|
+
export declare function useNotificationSettings(): {
|
|
9
|
+
setSettings: (settings: NotificationSettingsConfig) => void;
|
|
10
|
+
setSettingsInitialConfig: (settingsInitialConfig: NotificationInitialSettingsConfig[]) => void;
|
|
11
|
+
settings: NotificationSettingsConfig | null;
|
|
12
|
+
};
|
|
@@ -14,7 +14,7 @@ export { useAIRewriterUtils, } from './RewriterElement';
|
|
|
14
14
|
export { useLiveSelectionUtils, useLiveSelectionDataHandler, } from './SelectionElement';
|
|
15
15
|
export { useTagUtils, useTagAnnotations, } from './TagElement';
|
|
16
16
|
export { useViewsUtils, useUniqueViewsByDate, useUniqueViewsByUser, } from './ViewsElement';
|
|
17
|
-
export { useNotificationUtils, useNotificationsData, useUnreadNotificationsCount } from './NotificationElement';
|
|
17
|
+
export { useNotificationUtils, useNotificationsData, useUnreadNotificationsCount, useNotificationSettings, } from './NotificationElement';
|
|
18
18
|
export { useNotificationEventCallback, } from './NotificationsActions';
|
|
19
19
|
export { useAutocompleteUtils, useAutocompleteChipClick, } from './AutocompleteElement';
|
|
20
20
|
export { useContactUtils, useContactSelected, useContactList, } from './ContactElement';
|
package/esm/index.js
CHANGED
|
@@ -136,13 +136,13 @@ var loadVelt = function (callback, version, staging, develop, proxyDomain, integ
|
|
|
136
136
|
}
|
|
137
137
|
};
|
|
138
138
|
|
|
139
|
-
var VELT_SDK_VERSION = '4.5.0-beta.
|
|
139
|
+
var VELT_SDK_VERSION = '4.5.0-beta.30';
|
|
140
140
|
var VELT_SDK_INIT_EVENT = 'onVeltInit';
|
|
141
141
|
var VELT_TAB_ID = 'veltTabId';
|
|
142
142
|
// integrity map for the Velt SDK
|
|
143
143
|
// Note: generate integrity hashes with: https://www.srihash.org/
|
|
144
144
|
var INTEGRITY_MAP = {
|
|
145
|
-
'4.5.0-beta.
|
|
145
|
+
'4.5.0-beta.30': 'sha384-y/HvXXtkHBzwnUEccSp+ehtpde5oqQz9TzVxg19N5ScNBb2EGk6LgAvwx+9ofkBn',
|
|
146
146
|
};
|
|
147
147
|
|
|
148
148
|
var SnippylyProvider = function (props) {
|
|
@@ -7198,6 +7198,47 @@ function useUnreadNotificationsCount() {
|
|
|
7198
7198
|
}, [notificationElement === null || notificationElement === void 0 ? void 0 : notificationElement.getUnreadNotificationsCount]);
|
|
7199
7199
|
return data;
|
|
7200
7200
|
}
|
|
7201
|
+
function useNotificationSettings() {
|
|
7202
|
+
var notificationElement = useNotificationUtils();
|
|
7203
|
+
var _a = React.useState(null), settings = _a[0], setSettings = _a[1];
|
|
7204
|
+
var _b = React.useState(undefined), settingsData = _b[0], setSettingsData = _b[1];
|
|
7205
|
+
var _c = React.useState(undefined), settingsInitialConfigData = _c[0], setSettingsInitialConfigData = _c[1];
|
|
7206
|
+
useEffect(function () {
|
|
7207
|
+
if ((notificationElement === null || notificationElement === void 0 ? void 0 : notificationElement.setSettingsInitialConfig) && settingsInitialConfigData) {
|
|
7208
|
+
notificationElement.setSettingsInitialConfig(settingsInitialConfigData);
|
|
7209
|
+
}
|
|
7210
|
+
}, [notificationElement === null || notificationElement === void 0 ? void 0 : notificationElement.setSettingsInitialConfig, settingsInitialConfigData]);
|
|
7211
|
+
useEffect(function () {
|
|
7212
|
+
if ((notificationElement === null || notificationElement === void 0 ? void 0 : notificationElement.setSettings) && settingsData) {
|
|
7213
|
+
notificationElement.setSettings(settingsData);
|
|
7214
|
+
}
|
|
7215
|
+
}, [notificationElement === null || notificationElement === void 0 ? void 0 : notificationElement.setSettings, settingsData]);
|
|
7216
|
+
useEffect(function () {
|
|
7217
|
+
var _a;
|
|
7218
|
+
if (!(notificationElement === null || notificationElement === void 0 ? void 0 : notificationElement.getSettings))
|
|
7219
|
+
return;
|
|
7220
|
+
// Added this check to make is backward compatible with the old version of the SDK where getSettings() returns value instead of observable
|
|
7221
|
+
if (!((_a = notificationElement === null || notificationElement === void 0 ? void 0 : notificationElement.getSettings()) === null || _a === void 0 ? void 0 : _a.subscribe))
|
|
7222
|
+
return;
|
|
7223
|
+
var subscription = notificationElement.getSettings().subscribe(function (res) {
|
|
7224
|
+
setSettings(res);
|
|
7225
|
+
});
|
|
7226
|
+
return function () {
|
|
7227
|
+
subscription.unsubscribe();
|
|
7228
|
+
};
|
|
7229
|
+
}, [notificationElement === null || notificationElement === void 0 ? void 0 : notificationElement.getSettings]);
|
|
7230
|
+
var setSettingsInitialConfigCallback = React.useCallback(function (settingsInitialConfig) {
|
|
7231
|
+
setSettingsInitialConfigData(settingsInitialConfig);
|
|
7232
|
+
}, []);
|
|
7233
|
+
var setSettingsCallback = React.useCallback(function (settings) {
|
|
7234
|
+
setSettingsData(settings);
|
|
7235
|
+
}, []);
|
|
7236
|
+
return {
|
|
7237
|
+
settings: settings,
|
|
7238
|
+
setSettings: setSettingsCallback,
|
|
7239
|
+
setSettingsInitialConfig: setSettingsInitialConfigCallback,
|
|
7240
|
+
};
|
|
7241
|
+
}
|
|
7201
7242
|
|
|
7202
7243
|
function useNotificationEventCallback(action) {
|
|
7203
7244
|
var notificationElement = useNotificationUtils();
|
|
@@ -7440,5 +7481,5 @@ var logLiveState = function (action, liveStateDataId) {
|
|
|
7440
7481
|
}
|
|
7441
7482
|
};
|
|
7442
7483
|
|
|
7443
|
-
export { SnippylyArrowTool as VeltArrowTool, SnippylyArrows as VeltArrows, VeltAutocomplete, VeltAutocompleteChipTooltipWireframe, VeltAutocompleteGroupOptionWireframe, VeltAutocompleteOptionWireframe, VeltButtonWireframe, VeltCanvasComment, VeltChartComment, SnippylyCommentBubble as VeltCommentBubble, VeltCommentBubbleWireframe, VeltCommentComposer, VeltCommentComposerWireframe, VeltCommentDialogOptionsDropdownContentWireframe, VeltCommentDialogOptionsDropdownTriggerWireframe, VeltCommentDialogPriorityDropdownContentWireframe, VeltCommentDialogPriorityDropdownTriggerWireframe, VeltCommentDialogStatusDropdownContentWireframe, VeltCommentDialogStatusDropdownTriggerWireframe, VeltCommentDialogWireframe, VeltCommentPin, VeltCommentPinWireframe, VeltCommentPlayerTimeline, VeltCommentText, VeltCommentThread, VeltCommentThreadWireframe, SnippylyCommentTool as VeltCommentTool, VeltCommentToolWireframe, SnippylyComments as VeltComments, VeltCommentsMinimap, SnippylyCommentsSidebar as VeltCommentsSidebar, VeltCommentsSidebarButton, VeltCommentsSidebarStatusDropdownWireframe, VeltCommentsSidebarWireframe, VeltConfirmDialogWireframe, SnippylyCursor as VeltCursor, VeltData, VeltHighChartComments, SnippylyHuddle as VeltHuddle, SnippylyHuddleTool as VeltHuddleTool, VeltIf, VeltInlineCommentsSection, VeltInlineCommentsSectionWireframe, VeltInlineReactionsSection, VeltInlineReactionsSectionWireframe, VeltMediaSourceSettingsWireframe, VeltMultiThreadCommentDialogWireframe, VeltNivoChartComments, VeltNotificationsHistoryPanel, VeltNotificationsPanel, VeltNotificationsPanelWireframe, VeltNotificationsTool, VeltNotificationsToolWireframe, VeltPersistentCommentModeWireframe, SnippylyPresence as VeltPresence, VeltPresenceTooltipWireframe, VeltPresenceWireframe, SnippylyProvider as VeltProvider, VeltReactionPinTooltipWireframe, VeltReactionPinWireframe, VeltReactionTool, VeltReactionToolWireframe, VeltReactionsPanelWireframe, VeltRecorderAllToolMenuWireframe, VeltRecorderAllToolWireframe, VeltRecorderAudioToolWireframe, SnippylyRecorderControlPanel as VeltRecorderControlPanel, VeltRecorderControlPanelWireframe, SnippylyRecorderNotes as VeltRecorderNotes, SnippylyRecorderPlayer as VeltRecorderPlayer, VeltRecorderPlayerExpandedWireframe, VeltRecorderPlayerWireframe, VeltRecorderScreenToolWireframe, SnippylyRecorderTool as VeltRecorderTool, VeltRecorderVideoToolWireframe, VeltRecordingPreviewStepsDialogWireframe, SnippylySidebarButton as VeltSidebarButton, VeltSidebarButtonWireframe, VeltSingleEditorModePanel, VeltSingleEditorModePanelWireframe, VeltSubtitlesWireframe, SnippylyTagTool as VeltTagTool, SnippylyTags as VeltTags, VeltTextCommentToolWireframe, VeltTextCommentToolbar as VeltTextCommentToolbarWireframe, VeltTranscriptionWireframe, SnippylyUserInviteTool as VeltUserInviteTool, SnippylyUserRequestTool as VeltUserRequestTool, VeltUserSelectorDropdown as VeltUserSelectorDropdownWireframe, VeltVideoEditorPlayerWireframe, VeltVideoPlayer, VeltViewAnalytics, VeltWireframe, createLiveStateMiddleware, useAIRewriterUtils, useAddAttachment, useAddComment, useAddCommentAnnotation, useAddReaction, useApproveCommentAnnotation, useAssignUser, useAutocompleteChipClick, useAutocompleteUtils, useClient, useCommentActionCallback, useCommentAddHandler, useCommentAnnotationById, useCommentAnnotations, useCommentAnnotationsCount, useCommentCopyLinkHandler, useCommentDialogSidebarClickHandler, useCommentEventCallback, useCommentModeState, useCommentSelectionChangeHandler, useCommentSidebarActionButtonClick, useCommentSidebarData, useCommentSidebarInit, useCommentUpdateHandler, useCommentUtils, useContactList, useContactSelected, useContactUtils, useCopyLink, useCursorUsers, useCursorUtils, useDeleteAttachment, useDeleteComment, useDeleteCommentAnnotation, useDeleteReaction, useDeleteRecording, useEditor, useEditorAccessRequestHandler, useEditorAccessTimer, useGetAttachment, useGetComment, useGetCommentAnnotations, useGetLink, useGetRecording, useHuddleUtils, useIdentify, useLiveSelectionDataHandler, useLiveSelectionUtils, useLiveState, useLiveStateData, useLiveStateSyncEventCallback, useLiveStateSyncUtils, useNotificationEventCallback, useNotificationUtils, useNotificationsData, usePresenceData, usePresenceEventCallback, usePresenceUsers, usePresenceUtils, useRecorderAddHandler, useRecorderEventCallback, useRecorderUtils, useRecordingDataByRecorderId, useRecordings, useRejectCommentAnnotation, useResolveCommentAnnotation, useServerConnectionStateChangeHandler, useSetDocument, useSetDocumentId, useSetDocuments, useSetLiveStateData, useSetLocation, useSetLocations, useSetRootDocument, useSetRootLocation, useSubscribeCommentAnnotation, useTagAnnotations, useTagUtils, useToggleReaction, useUniqueViewsByDate, useUniqueViewsByUser, useUnreadCommentAnnotationCountByLocationId, useUnreadCommentAnnotationCountOnCurrentDocument, useUnreadCommentCountByAnnotationId, useUnreadCommentCountByLocationId, useUnreadCommentCountOnCurrentDocument, useUnreadNotificationsCount, useUnsetDocumentId, useUnsetDocuments, useUnsubscribeCommentAnnotation, useUpdateAccess, useUpdateComment, useUpdatePriority, useUpdateStatus, useUserEditorState, useVeltClient, useVeltEventCallback, useVeltInitState, useViewsUtils };
|
|
7484
|
+
export { SnippylyArrowTool as VeltArrowTool, SnippylyArrows as VeltArrows, VeltAutocomplete, VeltAutocompleteChipTooltipWireframe, VeltAutocompleteGroupOptionWireframe, VeltAutocompleteOptionWireframe, VeltButtonWireframe, VeltCanvasComment, VeltChartComment, SnippylyCommentBubble as VeltCommentBubble, VeltCommentBubbleWireframe, VeltCommentComposer, VeltCommentComposerWireframe, VeltCommentDialogOptionsDropdownContentWireframe, VeltCommentDialogOptionsDropdownTriggerWireframe, VeltCommentDialogPriorityDropdownContentWireframe, VeltCommentDialogPriorityDropdownTriggerWireframe, VeltCommentDialogStatusDropdownContentWireframe, VeltCommentDialogStatusDropdownTriggerWireframe, VeltCommentDialogWireframe, VeltCommentPin, VeltCommentPinWireframe, VeltCommentPlayerTimeline, VeltCommentText, VeltCommentThread, VeltCommentThreadWireframe, SnippylyCommentTool as VeltCommentTool, VeltCommentToolWireframe, SnippylyComments as VeltComments, VeltCommentsMinimap, SnippylyCommentsSidebar as VeltCommentsSidebar, VeltCommentsSidebarButton, VeltCommentsSidebarStatusDropdownWireframe, VeltCommentsSidebarWireframe, VeltConfirmDialogWireframe, SnippylyCursor as VeltCursor, VeltData, VeltHighChartComments, SnippylyHuddle as VeltHuddle, SnippylyHuddleTool as VeltHuddleTool, VeltIf, VeltInlineCommentsSection, VeltInlineCommentsSectionWireframe, VeltInlineReactionsSection, VeltInlineReactionsSectionWireframe, VeltMediaSourceSettingsWireframe, VeltMultiThreadCommentDialogWireframe, VeltNivoChartComments, VeltNotificationsHistoryPanel, VeltNotificationsPanel, VeltNotificationsPanelWireframe, VeltNotificationsTool, VeltNotificationsToolWireframe, VeltPersistentCommentModeWireframe, SnippylyPresence as VeltPresence, VeltPresenceTooltipWireframe, VeltPresenceWireframe, SnippylyProvider as VeltProvider, VeltReactionPinTooltipWireframe, VeltReactionPinWireframe, VeltReactionTool, VeltReactionToolWireframe, VeltReactionsPanelWireframe, VeltRecorderAllToolMenuWireframe, VeltRecorderAllToolWireframe, VeltRecorderAudioToolWireframe, SnippylyRecorderControlPanel as VeltRecorderControlPanel, VeltRecorderControlPanelWireframe, SnippylyRecorderNotes as VeltRecorderNotes, SnippylyRecorderPlayer as VeltRecorderPlayer, VeltRecorderPlayerExpandedWireframe, VeltRecorderPlayerWireframe, VeltRecorderScreenToolWireframe, SnippylyRecorderTool as VeltRecorderTool, VeltRecorderVideoToolWireframe, VeltRecordingPreviewStepsDialogWireframe, SnippylySidebarButton as VeltSidebarButton, VeltSidebarButtonWireframe, VeltSingleEditorModePanel, VeltSingleEditorModePanelWireframe, VeltSubtitlesWireframe, SnippylyTagTool as VeltTagTool, SnippylyTags as VeltTags, VeltTextCommentToolWireframe, VeltTextCommentToolbar as VeltTextCommentToolbarWireframe, VeltTranscriptionWireframe, SnippylyUserInviteTool as VeltUserInviteTool, SnippylyUserRequestTool as VeltUserRequestTool, VeltUserSelectorDropdown as VeltUserSelectorDropdownWireframe, VeltVideoEditorPlayerWireframe, VeltVideoPlayer, VeltViewAnalytics, VeltWireframe, createLiveStateMiddleware, useAIRewriterUtils, useAddAttachment, useAddComment, useAddCommentAnnotation, useAddReaction, useApproveCommentAnnotation, useAssignUser, useAutocompleteChipClick, useAutocompleteUtils, useClient, useCommentActionCallback, useCommentAddHandler, useCommentAnnotationById, useCommentAnnotations, useCommentAnnotationsCount, useCommentCopyLinkHandler, useCommentDialogSidebarClickHandler, useCommentEventCallback, useCommentModeState, useCommentSelectionChangeHandler, useCommentSidebarActionButtonClick, useCommentSidebarData, useCommentSidebarInit, useCommentUpdateHandler, useCommentUtils, useContactList, useContactSelected, useContactUtils, useCopyLink, useCursorUsers, useCursorUtils, useDeleteAttachment, useDeleteComment, useDeleteCommentAnnotation, useDeleteReaction, useDeleteRecording, useEditor, useEditorAccessRequestHandler, useEditorAccessTimer, useGetAttachment, useGetComment, useGetCommentAnnotations, useGetLink, useGetRecording, useHuddleUtils, useIdentify, useLiveSelectionDataHandler, useLiveSelectionUtils, useLiveState, useLiveStateData, useLiveStateSyncEventCallback, useLiveStateSyncUtils, useNotificationEventCallback, useNotificationSettings, useNotificationUtils, useNotificationsData, usePresenceData, usePresenceEventCallback, usePresenceUsers, usePresenceUtils, useRecorderAddHandler, useRecorderEventCallback, useRecorderUtils, useRecordingDataByRecorderId, useRecordings, useRejectCommentAnnotation, useResolveCommentAnnotation, useServerConnectionStateChangeHandler, useSetDocument, useSetDocumentId, useSetDocuments, useSetLiveStateData, useSetLocation, useSetLocations, useSetRootDocument, useSetRootLocation, useSubscribeCommentAnnotation, useTagAnnotations, useTagUtils, useToggleReaction, useUniqueViewsByDate, useUniqueViewsByUser, useUnreadCommentAnnotationCountByLocationId, useUnreadCommentAnnotationCountOnCurrentDocument, useUnreadCommentCountByAnnotationId, useUnreadCommentCountByLocationId, useUnreadCommentCountOnCurrentDocument, useUnreadNotificationsCount, useUnsetDocumentId, useUnsetDocuments, useUnsubscribeCommentAnnotation, useUpdateAccess, useUpdateComment, useUpdatePriority, useUpdateStatus, useUserEditorState, useVeltClient, useVeltEventCallback, useVeltInitState, useViewsUtils };
|
|
7444
7485
|
//# sourceMappingURL=index.js.map
|