@veltdev/react 1.0.94 → 1.0.95
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 +39 -4
- package/cjs/index.js.map +1 -1
- package/cjs/types/components/VeltNotificationsHistoryPanel/VeltNotificationsHistoryPanel.d.ts +7 -0
- package/cjs/types/components/VeltNotificationsHistoryPanel/index.d.ts +1 -0
- package/cjs/types/components/index.d.ts +1 -1
- package/cjs/types/constants.d.ts +1 -1
- package/cjs/types/hooks/NotificationElement.d.ts +9 -0
- package/cjs/types/hooks/index.d.ts +1 -0
- package/esm/index.js +37 -4
- package/esm/index.js.map +1 -1
- package/esm/types/components/VeltNotificationsHistoryPanel/VeltNotificationsHistoryPanel.d.ts +7 -0
- package/esm/types/components/VeltNotificationsHistoryPanel/index.d.ts +1 -0
- package/esm/types/components/index.d.ts +1 -1
- package/esm/types/constants.d.ts +1 -1
- package/esm/types/hooks/NotificationElement.d.ts +9 -0
- package/esm/types/hooks/index.d.ts +1 -0
- package/index.d.ts +13 -4
- package/package.json +1 -1
- package/cjs/types/components/VeltNotificationsHistory/VeltNotificationsHistory.d.ts +0 -7
- package/cjs/types/components/VeltNotificationsHistory/index.d.ts +0 -1
- package/esm/types/components/VeltNotificationsHistory/VeltNotificationsHistory.d.ts +0 -7
- package/esm/types/components/VeltNotificationsHistory/index.d.ts +0 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface IVeltNotificationsHistoryPanelProps {
|
|
3
|
+
embedMode?: boolean;
|
|
4
|
+
onNotificationClick?: Function;
|
|
5
|
+
}
|
|
6
|
+
declare const VeltNotificationsHistoryPanel: React.FC<IVeltNotificationsHistoryPanelProps>;
|
|
7
|
+
export default VeltNotificationsHistoryPanel;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./VeltNotificationsHistoryPanel";
|
|
@@ -24,4 +24,4 @@ export { default as VeltViewAnalytics } from "./VeltViewAnalytics";
|
|
|
24
24
|
export { default as VeltCommentThread } from "./VeltCommentThread";
|
|
25
25
|
export { default as VeltNotificationsTool } from "./VeltNotificationsTool";
|
|
26
26
|
export { default as VeltNotificationsPanel } from "./VeltNotificationsPanel";
|
|
27
|
-
export { default as
|
|
27
|
+
export { default as VeltNotificationsHistoryPanel } from "./VeltNotificationsHistoryPanel";
|
package/cjs/types/constants.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VELT_SDK_VERSION = "1.0.
|
|
1
|
+
export declare const VELT_SDK_VERSION = "1.0.110";
|
|
2
2
|
export declare const VELT_SDK_INIT_EVENT = "onVeltInit";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Notification, NotificationElement } from "@veltdev/types";
|
|
2
|
+
/**
|
|
3
|
+
* @beta This hook is in beta
|
|
4
|
+
*/
|
|
5
|
+
export declare function useNotificationUtils(): NotificationElement | undefined;
|
|
6
|
+
/**
|
|
7
|
+
* @beta This hook is in beta
|
|
8
|
+
*/
|
|
9
|
+
export declare function useNotificationsData(): Notification[] | null;
|
|
@@ -9,3 +9,4 @@ export { useAIRewriterUtils, } from './RewriterElement';
|
|
|
9
9
|
export { useLiveSelectionUtils, } from './SelectionElement';
|
|
10
10
|
export { useTagUtils, useTagAnnotations, } from './TagElement';
|
|
11
11
|
export { useViewsUtils, useUniqueViewsByDate, useUniqueViewsByUser, } from './ViewsElement';
|
|
12
|
+
export { useNotificationUtils, useNotificationsData, } from './NotificationElement';
|
package/esm/index.js
CHANGED
|
@@ -101,7 +101,7 @@ var loadVelt = function (callback, version, staging, develop) {
|
|
|
101
101
|
}
|
|
102
102
|
};
|
|
103
103
|
|
|
104
|
-
var VELT_SDK_VERSION = '1.0.
|
|
104
|
+
var VELT_SDK_VERSION = '1.0.110';
|
|
105
105
|
var VELT_SDK_INIT_EVENT = 'onVeltInit';
|
|
106
106
|
|
|
107
107
|
var SnippylyProvider = function (props) {
|
|
@@ -479,7 +479,7 @@ var VeltNotificationsPanel = function (props) {
|
|
|
479
479
|
return (React.createElement("velt-notifications-panel", { ref: ref }));
|
|
480
480
|
};
|
|
481
481
|
|
|
482
|
-
var
|
|
482
|
+
var VeltNotificationsHistoryPanel = function (props) {
|
|
483
483
|
var embedMode = props.embedMode, onNotificationClick = props.onNotificationClick;
|
|
484
484
|
var ref = useRef();
|
|
485
485
|
useEffect(function () {
|
|
@@ -492,7 +492,7 @@ var VeltNotificationsHistory = function (props) {
|
|
|
492
492
|
});
|
|
493
493
|
}
|
|
494
494
|
}, []);
|
|
495
|
-
return (React.createElement("velt-notifications-history", { ref: ref, "embed-mode": [true, false].includes(embedMode) ? (embedMode ? 'true' : 'false') : undefined }));
|
|
495
|
+
return (React.createElement("velt-notifications-history-panel", { ref: ref, "embed-mode": [true, false].includes(embedMode) ? (embedMode ? 'true' : 'false') : undefined }));
|
|
496
496
|
};
|
|
497
497
|
|
|
498
498
|
/**
|
|
@@ -1020,6 +1020,39 @@ function useUniqueViewsByDate(clientLocationId) {
|
|
|
1020
1020
|
return data;
|
|
1021
1021
|
}
|
|
1022
1022
|
|
|
1023
|
+
/**
|
|
1024
|
+
* @beta This hook is in beta
|
|
1025
|
+
*/
|
|
1026
|
+
function useNotificationUtils() {
|
|
1027
|
+
var _a = React.useState(), notificationElement = _a[0], setNotificationElement = _a[1];
|
|
1028
|
+
var client = useVeltClient().client;
|
|
1029
|
+
React.useEffect(function () {
|
|
1030
|
+
if (!client || notificationElement)
|
|
1031
|
+
return;
|
|
1032
|
+
var loadedNotificationElement = client.getNotificationElement();
|
|
1033
|
+
setNotificationElement(loadedNotificationElement);
|
|
1034
|
+
}, [client, setNotificationElement, notificationElement]);
|
|
1035
|
+
return notificationElement;
|
|
1036
|
+
}
|
|
1037
|
+
/**
|
|
1038
|
+
* @beta This hook is in beta
|
|
1039
|
+
*/
|
|
1040
|
+
function useNotificationsData() {
|
|
1041
|
+
var notificationElement = useNotificationUtils();
|
|
1042
|
+
var _a = React.useState([]), data = _a[0], setData = _a[1];
|
|
1043
|
+
useEffect(function () {
|
|
1044
|
+
if (!(notificationElement === null || notificationElement === void 0 ? void 0 : notificationElement.getNotificationsData))
|
|
1045
|
+
return;
|
|
1046
|
+
var subscription = notificationElement.getNotificationsData().subscribe(function (res) {
|
|
1047
|
+
setData(res);
|
|
1048
|
+
});
|
|
1049
|
+
return function () {
|
|
1050
|
+
subscription.unsubscribe();
|
|
1051
|
+
};
|
|
1052
|
+
}, [notificationElement === null || notificationElement === void 0 ? void 0 : notificationElement.getNotificationsData]);
|
|
1053
|
+
return data;
|
|
1054
|
+
}
|
|
1055
|
+
|
|
1023
1056
|
var sessionId = Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);
|
|
1024
1057
|
var getSessionId = function () {
|
|
1025
1058
|
return sessionId;
|
|
@@ -1096,5 +1129,5 @@ var logLiveState = function (action, liveStateDataId) {
|
|
|
1096
1129
|
}
|
|
1097
1130
|
};
|
|
1098
1131
|
|
|
1099
|
-
export { SnippylyArrowTool as VeltArrowTool, SnippylyArrows as VeltArrows, SnippylyCommentBubble as VeltCommentBubble, VeltCommentPlayerTimeline, VeltCommentThread, SnippylyCommentTool as VeltCommentTool, SnippylyComments as VeltComments, SnippylyCommentsSidebar as VeltCommentsSidebar, SnippylyCursor as VeltCursor, SnippylyHuddle as VeltHuddle, SnippylyHuddleTool as VeltHuddleTool,
|
|
1132
|
+
export { SnippylyArrowTool as VeltArrowTool, SnippylyArrows as VeltArrows, SnippylyCommentBubble as VeltCommentBubble, VeltCommentPlayerTimeline, VeltCommentThread, SnippylyCommentTool as VeltCommentTool, SnippylyComments as VeltComments, SnippylyCommentsSidebar as VeltCommentsSidebar, SnippylyCursor as VeltCursor, SnippylyHuddle as VeltHuddle, SnippylyHuddleTool as VeltHuddleTool, VeltNotificationsHistoryPanel, VeltNotificationsPanel, VeltNotificationsTool, SnippylyPresence as VeltPresence, SnippylyProvider as VeltProvider, SnippylyRecorderControlPanel as VeltRecorderControlPanel, SnippylyRecorderNotes as VeltRecorderNotes, SnippylyRecorderPlayer as VeltRecorderPlayer, SnippylyRecorderTool as VeltRecorderTool, SnippylySidebarButton as VeltSidebarButton, SnippylyTagTool as VeltTagTool, SnippylyTags as VeltTags, SnippylyUserInviteTool as VeltUserInviteTool, SnippylyUserRequestTool as VeltUserRequestTool, VeltVideoPlayer, VeltViewAnalytics, createLiveStateMiddleware, useAIRewriterUtils, useAddLocation, useClient, useCommentAddHandler, useCommentAnnotations, useCommentDialogSidebarClickHandler, useCommentModeState, useCommentUpdateHandler, useCommentUtils, useCursorUsers, useCursorUtils, useEditor, useEditorAccessRequestHandler, useHuddleUtils, useIdentify, useLiveSelectionUtils, useLiveState, useLiveStateData, useLiveStateSyncUtils, useNotificationUtils, useNotificationsData, usePresenceUsers, usePresenceUtils, useRecorderAddHandler, useRecorderUtils, useSetDocumentId, useSetLiveStateData, useSetLocation, useTagAnnotations, useTagUtils, useUniqueViewsByDate, useUniqueViewsByUser, useUserEditorState, useVeltClient, useViewsUtils };
|
|
1100
1133
|
//# sourceMappingURL=index.js.map
|