@veltdev/react 4.0.0-beta.2 → 4.0.0-beta.4
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 +79 -61
- package/cjs/index.js.map +1 -1
- package/cjs/types/components/VeltCommentsSidebarWireframe/VeltCommentsSidebarFilter/VeltCommentsSidebarFilter.d.ts +2 -0
- package/cjs/types/components/VeltCommentsSidebarWireframe/VeltCommentsSidebarFilter/VeltCommentsSidebarFilterStatus/VeltCommentsSidebarFilterStatus.d.ts +12 -0
- package/cjs/types/components/VeltCommentsSidebarWireframe/VeltCommentsSidebarFilter/VeltCommentsSidebarFilterStatus/index.d.ts +1 -0
- package/cjs/types/constants.d.ts +1 -1
- package/cjs/types/hooks/CommentActions.d.ts +28 -28
- package/esm/index.js +79 -61
- package/esm/index.js.map +1 -1
- package/esm/types/components/VeltCommentsSidebarWireframe/VeltCommentsSidebarFilter/VeltCommentsSidebarFilter.d.ts +2 -0
- package/esm/types/components/VeltCommentsSidebarWireframe/VeltCommentsSidebarFilter/VeltCommentsSidebarFilterStatus/VeltCommentsSidebarFilterStatus.d.ts +12 -0
- package/esm/types/components/VeltCommentsSidebarWireframe/VeltCommentsSidebarFilter/VeltCommentsSidebarFilterStatus/index.d.ts +1 -0
- package/esm/types/constants.d.ts +1 -1
- package/esm/types/hooks/CommentActions.d.ts +28 -28
- package/index.d.ts +37 -28
- package/package.json +1 -1
|
@@ -10,6 +10,7 @@ import { IVeltCommentsSidebarFilterPriority } from './VeltCommentsSidebarFilterP
|
|
|
10
10
|
import { IVeltCommentsSidebarFilterTitleProps } from './VeltCommentsSidebarFilterTitle/VeltCommentsSidebarFilterTitle';
|
|
11
11
|
import { IVeltCommentsSidebarFilterVersions } from './VeltCommentsSidebarFilterVersions/VeltCommentsSidebarFilterVersions';
|
|
12
12
|
import { IVeltCommentsSidebarFilterItem } from './VeltCommentsSidebarFilterItem/VeltCommentsSidebarFilterItem';
|
|
13
|
+
import { IVeltCommentsSidebarFilterStatus } from './VeltCommentsSidebarFilterStatus/VeltCommentsSidebarFilterStatus';
|
|
13
14
|
export interface IVeltCommentsSidebarFilterProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> {
|
|
14
15
|
variant?: string;
|
|
15
16
|
}
|
|
@@ -25,6 +26,7 @@ export interface IVeltCommentsSidebarFilter extends React.FC<IVeltCommentsSideba
|
|
|
25
26
|
GroupBy: IVeltCommentsSidebarFilterGroupBy;
|
|
26
27
|
DoneButton: React.FC<IVeltCommentsSidebarFilterDoneButtonProps>;
|
|
27
28
|
Item: IVeltCommentsSidebarFilterItem;
|
|
29
|
+
Status: IVeltCommentsSidebarFilterStatus;
|
|
28
30
|
}
|
|
29
31
|
declare const VeltCommentsSidebarFilter: IVeltCommentsSidebarFilter;
|
|
30
32
|
export default VeltCommentsSidebarFilter;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IVeltCommentsSidebarFilterItem } from '../VeltCommentsSidebarFilterItem/VeltCommentsSidebarFilterItem';
|
|
3
|
+
import { IVeltCommentsSidebarFilterNameProps } from '../VeltCommentsSidebarFilterName/VeltCommentsSidebarFilterName';
|
|
4
|
+
export interface IVeltCommentsSidebarFilterStatusProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> {
|
|
5
|
+
variant?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface IVeltCommentsSidebarFilterStatus extends React.FC<IVeltCommentsSidebarFilterStatusProps> {
|
|
8
|
+
Name: React.FC<IVeltCommentsSidebarFilterNameProps>;
|
|
9
|
+
Item: IVeltCommentsSidebarFilterItem;
|
|
10
|
+
}
|
|
11
|
+
declare const VeltCommentsSidebarFilterStatus: IVeltCommentsSidebarFilterStatus;
|
|
12
|
+
export default VeltCommentsSidebarFilterStatus;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./VeltCommentsSidebarFilterStatus";
|
package/cjs/types/constants.d.ts
CHANGED
|
@@ -1,80 +1,80 @@
|
|
|
1
|
-
import { AddAttachmentRequest, AddAttachmentResponse, AddCommentAnnotationEvent, AddCommentAnnotationRequest, AddCommentEvent, AddCommentRequest, AddReactionEvent, AddReactionRequest, ApproveCommentAnnotationEvent, ApproveCommentAnnotationRequest, AssignUserEvent, AssignUserRequest, Attachment, CommentEventTypesMap, CopyLinkEvent, CopyLinkRequest, DeleteAttachmentEvent, DeleteAttachmentRequest, DeleteCommentAnnotationEvent, DeleteCommentAnnotationRequest, DeleteCommentEvent, DeleteCommentRequest, DeleteReactionEvent, DeleteReactionRequest, DeleteRecordingEvent, DeleteRecordingRequest, GetAttachmentRequest,
|
|
1
|
+
import { AddAttachmentRequest, AddAttachmentResponse, AddCommentAnnotationEvent, AddCommentAnnotationRequest, AddCommentEvent, AddCommentRequest, AddReactionEvent, AddReactionRequest, ApproveCommentAnnotationEvent, ApproveCommentAnnotationRequest, AssignUserEvent, AssignUserRequest, Attachment, CommentEventTypesMap, CommentRequestQuery, CopyLinkEvent, CopyLinkRequest, DeleteAttachmentEvent, DeleteAttachmentRequest, DeleteCommentAnnotationEvent, DeleteCommentAnnotationRequest, DeleteCommentEvent, DeleteCommentRequest, DeleteReactionEvent, DeleteReactionRequest, DeleteRecordingEvent, DeleteRecordingRequest, GetAttachmentRequest, GetCommentAnnotationsCountResponse, GetCommentAnnotationsResponse, GetCommentRequest, GetLinkRequest, GetLinkResponse, GetRecordingRequest, RecordedData, RejectCommentAnnotationEvent, RejectCommentAnnotationRequest, ResolveCommentAnnotationRequest, SubscribeCommentAnnotationEvent, SubscribeCommentAnnotationRequest, ToggleReactionEvent, ToggleReactionRequest, UnsubscribeCommentAnnotationEvent, UnsubscribeCommentAnnotationRequest, UpdateAccessEvent, UpdateAccessRequest, UpdateCommentEvent, UpdateCommentRequest, UpdatePriorityEvent, UpdatePriorityRequest, UpdateStatusEvent, UpdateStatusRequest } from "@veltdev/types";
|
|
2
2
|
export declare function useAddCommentAnnotation(): {
|
|
3
|
-
addCommentAnnotation: (
|
|
3
|
+
addCommentAnnotation: (request: AddCommentAnnotationRequest) => Promise<AddCommentAnnotationEvent | null>;
|
|
4
4
|
};
|
|
5
5
|
export declare function useApproveCommentAnnotation(): {
|
|
6
|
-
approveCommentAnnotation: (
|
|
6
|
+
approveCommentAnnotation: (request: ApproveCommentAnnotationRequest) => Promise<ApproveCommentAnnotationEvent | null>;
|
|
7
7
|
};
|
|
8
8
|
export declare function useRejectCommentAnnotation(): {
|
|
9
|
-
rejectCommentAnnotation: (
|
|
9
|
+
rejectCommentAnnotation: (request: RejectCommentAnnotationRequest) => Promise<RejectCommentAnnotationEvent | null>;
|
|
10
10
|
};
|
|
11
11
|
export declare function useSubscribeCommentAnnotation(): {
|
|
12
|
-
subscribeCommentAnnotation: (
|
|
12
|
+
subscribeCommentAnnotation: (request: SubscribeCommentAnnotationRequest) => Promise<SubscribeCommentAnnotationEvent | null>;
|
|
13
13
|
};
|
|
14
14
|
export declare function useUnsubscribeCommentAnnotation(): {
|
|
15
|
-
unsubscribeCommentAnnotation: (
|
|
15
|
+
unsubscribeCommentAnnotation: (request: UnsubscribeCommentAnnotationRequest) => Promise<UnsubscribeCommentAnnotationEvent | null>;
|
|
16
16
|
};
|
|
17
17
|
export declare function useDeleteCommentAnnotation(): {
|
|
18
|
-
deleteCommentAnnotation: (
|
|
18
|
+
deleteCommentAnnotation: (request: DeleteCommentAnnotationRequest) => Promise<DeleteCommentAnnotationEvent | null>;
|
|
19
19
|
};
|
|
20
|
-
export declare function useGetCommentAnnotations(
|
|
21
|
-
export declare function useCommentAnnotationsCount(
|
|
20
|
+
export declare function useGetCommentAnnotations(query?: CommentRequestQuery): GetCommentAnnotationsResponse;
|
|
21
|
+
export declare function useCommentAnnotationsCount(query?: CommentRequestQuery): GetCommentAnnotationsCountResponse;
|
|
22
22
|
export declare function useAssignUser(): {
|
|
23
|
-
assignUser: (
|
|
23
|
+
assignUser: (request: AssignUserRequest) => Promise<AssignUserEvent | null>;
|
|
24
24
|
};
|
|
25
25
|
export declare function useUpdatePriority(): {
|
|
26
|
-
updatePriority: (
|
|
26
|
+
updatePriority: (request: UpdatePriorityRequest) => Promise<UpdatePriorityEvent | null>;
|
|
27
27
|
};
|
|
28
28
|
export declare function useUpdateStatus(): {
|
|
29
|
-
updateStatus: (
|
|
29
|
+
updateStatus: (request: UpdateStatusRequest) => Promise<UpdateStatusEvent | null>;
|
|
30
30
|
};
|
|
31
31
|
export declare function useUpdateAccess(): {
|
|
32
|
-
updateAccess: (
|
|
32
|
+
updateAccess: (request: UpdateAccessRequest) => Promise<UpdateAccessEvent | null>;
|
|
33
33
|
};
|
|
34
34
|
export declare function useResolveCommentAnnotation(): {
|
|
35
|
-
resolveCommentAnnotation: (
|
|
35
|
+
resolveCommentAnnotation: (request: ResolveCommentAnnotationRequest) => Promise<ResolveCommentAnnotationRequest | null>;
|
|
36
36
|
};
|
|
37
37
|
export declare function useGetLink(): {
|
|
38
|
-
getLink: (
|
|
38
|
+
getLink: (request: GetLinkRequest) => Promise<GetLinkResponse | null>;
|
|
39
39
|
};
|
|
40
40
|
export declare function useCopyLink(): {
|
|
41
|
-
copyLink: (
|
|
41
|
+
copyLink: (request: CopyLinkRequest) => Promise<CopyLinkEvent | null>;
|
|
42
42
|
};
|
|
43
43
|
export declare function useAddComment(): {
|
|
44
|
-
addComment: (
|
|
44
|
+
addComment: (request: AddCommentRequest) => Promise<AddCommentEvent | null>;
|
|
45
45
|
};
|
|
46
46
|
export declare function useUpdateComment(): {
|
|
47
|
-
updateComment: (
|
|
47
|
+
updateComment: (request: UpdateCommentRequest) => Promise<UpdateCommentEvent | null>;
|
|
48
48
|
};
|
|
49
49
|
export declare function useDeleteComment(): {
|
|
50
|
-
deleteComment: (
|
|
50
|
+
deleteComment: (request: DeleteCommentRequest) => Promise<DeleteCommentEvent | null>;
|
|
51
51
|
};
|
|
52
52
|
export declare function useGetComment(): {
|
|
53
|
-
getComment: (
|
|
53
|
+
getComment: (request: GetCommentRequest) => Promise<Comment[]>;
|
|
54
54
|
};
|
|
55
55
|
export declare function useAddAttachment(): {
|
|
56
|
-
addAttachment: (
|
|
56
|
+
addAttachment: (request: AddAttachmentRequest) => Promise<AddAttachmentResponse[] | null>;
|
|
57
57
|
};
|
|
58
58
|
export declare function useDeleteAttachment(): {
|
|
59
|
-
deleteAttachment: (
|
|
59
|
+
deleteAttachment: (request: DeleteAttachmentRequest) => Promise<DeleteAttachmentEvent | null>;
|
|
60
60
|
};
|
|
61
61
|
export declare function useGetAttachment(): {
|
|
62
|
-
getAttachment: (
|
|
62
|
+
getAttachment: (request: GetAttachmentRequest) => Promise<Attachment[] | null>;
|
|
63
63
|
};
|
|
64
64
|
export declare function useDeleteRecording(): {
|
|
65
|
-
deleteRecording: (
|
|
65
|
+
deleteRecording: (request: DeleteRecordingRequest) => Promise<DeleteRecordingEvent | null>;
|
|
66
66
|
};
|
|
67
67
|
export declare function useGetRecording(): {
|
|
68
|
-
getRecording: (
|
|
68
|
+
getRecording: (request: GetRecordingRequest) => Promise<RecordedData[] | null>;
|
|
69
69
|
};
|
|
70
70
|
export declare function useAddReaction(): {
|
|
71
|
-
addReaction: (
|
|
71
|
+
addReaction: (request: AddReactionRequest) => Promise<AddReactionEvent | null>;
|
|
72
72
|
};
|
|
73
73
|
export declare function useDeleteReaction(): {
|
|
74
|
-
deleteReaction: (
|
|
74
|
+
deleteReaction: (request: DeleteReactionRequest) => Promise<DeleteReactionEvent | null>;
|
|
75
75
|
};
|
|
76
76
|
export declare function useToggleReaction(): {
|
|
77
|
-
toggleReaction: (
|
|
77
|
+
toggleReaction: (request: ToggleReactionRequest) => Promise<ToggleReactionEvent | null>;
|
|
78
78
|
};
|
|
79
79
|
/**
|
|
80
80
|
* @deprecated Use useCommentEventCallback hook instead.
|
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 = '4.0.0-beta.
|
|
135
|
+
var VELT_SDK_VERSION = '4.0.0-beta.4';
|
|
136
136
|
var VELT_SDK_INIT_EVENT = 'onVeltInit';
|
|
137
137
|
var VELT_TAB_ID = 'veltTabId';
|
|
138
138
|
|
|
@@ -2386,6 +2386,13 @@ var VeltCommentsSidebarFilterVersions = function (props) {
|
|
|
2386
2386
|
VeltCommentsSidebarFilterVersions.Name = VeltCommentsSidebarFilterName;
|
|
2387
2387
|
VeltCommentsSidebarFilterVersions.Item = VeltCommentsSidebarFilterItem;
|
|
2388
2388
|
|
|
2389
|
+
var VeltCommentsSidebarFilterStatus = function (props) {
|
|
2390
|
+
var children = props.children, remainingProps = __rest(props, ["children"]);
|
|
2391
|
+
return (React.createElement("velt-comments-sidebar-filter-status-wireframe", __assign({}, remainingProps), children));
|
|
2392
|
+
};
|
|
2393
|
+
VeltCommentsSidebarFilterStatus.Name = VeltCommentsSidebarFilterName;
|
|
2394
|
+
VeltCommentsSidebarFilterStatus.Item = VeltCommentsSidebarFilterItem;
|
|
2395
|
+
|
|
2389
2396
|
var VeltCommentsSidebarFilter = function (props) {
|
|
2390
2397
|
var children = props.children, remainingProps = __rest(props, ["children"]);
|
|
2391
2398
|
return (React.createElement("velt-comments-sidebar-filter-wireframe", __assign({}, remainingProps), children));
|
|
@@ -2401,6 +2408,7 @@ VeltCommentsSidebarFilter.Priority = VeltCommentsSidebarFilterPriority;
|
|
|
2401
2408
|
VeltCommentsSidebarFilter.Title = VeltCommentsSidebarFilterTitle;
|
|
2402
2409
|
VeltCommentsSidebarFilter.Versions = VeltCommentsSidebarFilterVersions;
|
|
2403
2410
|
VeltCommentsSidebarFilter.Item = VeltCommentsSidebarFilterItem;
|
|
2411
|
+
VeltCommentsSidebarFilter.Status = VeltCommentsSidebarFilterStatus;
|
|
2404
2412
|
|
|
2405
2413
|
var VeltCommentsSidebarFilterButton = function (props) {
|
|
2406
2414
|
var children = props.children, remainingProps = __rest(props, ["children"]);
|
|
@@ -4759,11 +4767,11 @@ function useCommentSidebarData() {
|
|
|
4759
4767
|
function useAddCommentAnnotation() {
|
|
4760
4768
|
var commentElement = useCommentUtils();
|
|
4761
4769
|
return {
|
|
4762
|
-
addCommentAnnotation: function (
|
|
4770
|
+
addCommentAnnotation: function (request) {
|
|
4763
4771
|
return new Promise(function (resolve, reject) {
|
|
4764
4772
|
if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.addCommentAnnotation))
|
|
4765
4773
|
return reject(new Error('Velt SDK is not initialized.'));
|
|
4766
|
-
commentElement.addCommentAnnotation(
|
|
4774
|
+
commentElement.addCommentAnnotation(request).then(resolve).catch(reject);
|
|
4767
4775
|
});
|
|
4768
4776
|
}
|
|
4769
4777
|
};
|
|
@@ -4771,11 +4779,11 @@ function useAddCommentAnnotation() {
|
|
|
4771
4779
|
function useApproveCommentAnnotation() {
|
|
4772
4780
|
var commentElement = useCommentUtils();
|
|
4773
4781
|
return {
|
|
4774
|
-
approveCommentAnnotation: function (
|
|
4782
|
+
approveCommentAnnotation: function (request) {
|
|
4775
4783
|
return new Promise(function (resolve, reject) {
|
|
4776
4784
|
if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.approveCommentAnnotation))
|
|
4777
4785
|
return reject(new Error('Velt SDK is not initialized.'));
|
|
4778
|
-
commentElement.approveCommentAnnotation(
|
|
4786
|
+
commentElement.approveCommentAnnotation(request).then(resolve).catch(reject);
|
|
4779
4787
|
});
|
|
4780
4788
|
}
|
|
4781
4789
|
};
|
|
@@ -4783,11 +4791,11 @@ function useApproveCommentAnnotation() {
|
|
|
4783
4791
|
function useRejectCommentAnnotation() {
|
|
4784
4792
|
var commentElement = useCommentUtils();
|
|
4785
4793
|
return {
|
|
4786
|
-
rejectCommentAnnotation: function (
|
|
4794
|
+
rejectCommentAnnotation: function (request) {
|
|
4787
4795
|
return new Promise(function (resolve, reject) {
|
|
4788
4796
|
if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.rejectCommentAnnotation))
|
|
4789
4797
|
return reject(new Error('Velt SDK is not initialized.'));
|
|
4790
|
-
commentElement.rejectCommentAnnotation(
|
|
4798
|
+
commentElement.rejectCommentAnnotation(request).then(resolve).catch(reject);
|
|
4791
4799
|
});
|
|
4792
4800
|
}
|
|
4793
4801
|
};
|
|
@@ -4795,11 +4803,11 @@ function useRejectCommentAnnotation() {
|
|
|
4795
4803
|
function useSubscribeCommentAnnotation() {
|
|
4796
4804
|
var commentElement = useCommentUtils();
|
|
4797
4805
|
return {
|
|
4798
|
-
subscribeCommentAnnotation: function (
|
|
4806
|
+
subscribeCommentAnnotation: function (request) {
|
|
4799
4807
|
return new Promise(function (resolve, reject) {
|
|
4800
4808
|
if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.subscribeCommentAnnotation))
|
|
4801
4809
|
return reject(new Error('Velt SDK is not initialized.'));
|
|
4802
|
-
commentElement.subscribeCommentAnnotation(
|
|
4810
|
+
commentElement.subscribeCommentAnnotation(request).then(resolve).catch(reject);
|
|
4803
4811
|
});
|
|
4804
4812
|
}
|
|
4805
4813
|
};
|
|
@@ -4807,11 +4815,11 @@ function useSubscribeCommentAnnotation() {
|
|
|
4807
4815
|
function useUnsubscribeCommentAnnotation() {
|
|
4808
4816
|
var commentElement = useCommentUtils();
|
|
4809
4817
|
return {
|
|
4810
|
-
unsubscribeCommentAnnotation: function (
|
|
4818
|
+
unsubscribeCommentAnnotation: function (request) {
|
|
4811
4819
|
return new Promise(function (resolve, reject) {
|
|
4812
4820
|
if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.unsubscribeCommentAnnotation))
|
|
4813
4821
|
return reject(new Error('Velt SDK is not initialized.'));
|
|
4814
|
-
commentElement.unsubscribeCommentAnnotation(
|
|
4822
|
+
commentElement.unsubscribeCommentAnnotation(request).then(resolve).catch(reject);
|
|
4815
4823
|
});
|
|
4816
4824
|
}
|
|
4817
4825
|
};
|
|
@@ -4819,23 +4827,23 @@ function useUnsubscribeCommentAnnotation() {
|
|
|
4819
4827
|
function useDeleteCommentAnnotation() {
|
|
4820
4828
|
var commentElement = useCommentUtils();
|
|
4821
4829
|
return {
|
|
4822
|
-
deleteCommentAnnotation: function (
|
|
4830
|
+
deleteCommentAnnotation: function (request) {
|
|
4823
4831
|
return new Promise(function (resolve, reject) {
|
|
4824
4832
|
if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.deleteCommentAnnotation))
|
|
4825
4833
|
return reject(new Error('Velt SDK is not initialized.'));
|
|
4826
|
-
commentElement.deleteCommentAnnotation(
|
|
4834
|
+
commentElement.deleteCommentAnnotation(request).then(resolve).catch(reject);
|
|
4827
4835
|
});
|
|
4828
4836
|
}
|
|
4829
4837
|
};
|
|
4830
4838
|
}
|
|
4831
|
-
function useGetCommentAnnotations(
|
|
4839
|
+
function useGetCommentAnnotations(query) {
|
|
4832
4840
|
var commentElement = useCommentUtils();
|
|
4833
|
-
var _a = useState(null), data = _a[0], setData = _a[1];
|
|
4841
|
+
var _a = useState({ data: null }), data = _a[0], setData = _a[1];
|
|
4834
4842
|
var subscriptionRef = useRef();
|
|
4835
4843
|
// Memoize the inputs
|
|
4836
4844
|
var memoizedData = useMemo(function () {
|
|
4837
|
-
return
|
|
4838
|
-
}, [JSON.stringify(
|
|
4845
|
+
return query;
|
|
4846
|
+
}, [JSON.stringify(query)]);
|
|
4839
4847
|
useEffect(function () {
|
|
4840
4848
|
if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.getCommentAnnotations))
|
|
4841
4849
|
return;
|
|
@@ -4845,7 +4853,12 @@ function useGetCommentAnnotations(getCommentAnnotationsRequest) {
|
|
|
4845
4853
|
}
|
|
4846
4854
|
var subscription = commentElement.getCommentAnnotations(memoizedData)
|
|
4847
4855
|
.subscribe(function (res) {
|
|
4848
|
-
|
|
4856
|
+
if (res) {
|
|
4857
|
+
setData(res);
|
|
4858
|
+
}
|
|
4859
|
+
else {
|
|
4860
|
+
setData({ data: null });
|
|
4861
|
+
}
|
|
4849
4862
|
});
|
|
4850
4863
|
// Store the new subscription
|
|
4851
4864
|
subscriptionRef.current = subscription;
|
|
@@ -4858,14 +4871,14 @@ function useGetCommentAnnotations(getCommentAnnotationsRequest) {
|
|
|
4858
4871
|
}, [commentElement === null || commentElement === void 0 ? void 0 : commentElement.getCommentAnnotations, memoizedData]);
|
|
4859
4872
|
return data;
|
|
4860
4873
|
}
|
|
4861
|
-
function useCommentAnnotationsCount(
|
|
4874
|
+
function useCommentAnnotationsCount(query) {
|
|
4862
4875
|
var commentElement = useCommentUtils();
|
|
4863
|
-
var _a = useState(null), data = _a[0], setData = _a[1];
|
|
4876
|
+
var _a = useState({ data: null }), data = _a[0], setData = _a[1];
|
|
4864
4877
|
var subscriptionRef = useRef();
|
|
4865
4878
|
// Memoize the inputs
|
|
4866
4879
|
var memoizedData = useMemo(function () {
|
|
4867
|
-
return
|
|
4868
|
-
}, [JSON.stringify(
|
|
4880
|
+
return query;
|
|
4881
|
+
}, [JSON.stringify(query)]);
|
|
4869
4882
|
useEffect(function () {
|
|
4870
4883
|
if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.getCommentAnnotationsCount))
|
|
4871
4884
|
return;
|
|
@@ -4875,7 +4888,12 @@ function useCommentAnnotationsCount(getCommentAnnotationsCountRequest) {
|
|
|
4875
4888
|
}
|
|
4876
4889
|
var subscription = commentElement.getCommentAnnotationsCount(memoizedData)
|
|
4877
4890
|
.subscribe(function (res) {
|
|
4878
|
-
|
|
4891
|
+
if (res) {
|
|
4892
|
+
setData(res);
|
|
4893
|
+
}
|
|
4894
|
+
else {
|
|
4895
|
+
setData({ data: null });
|
|
4896
|
+
}
|
|
4879
4897
|
});
|
|
4880
4898
|
// Store the new subscription
|
|
4881
4899
|
subscriptionRef.current = subscription;
|
|
@@ -4891,11 +4909,11 @@ function useCommentAnnotationsCount(getCommentAnnotationsCountRequest) {
|
|
|
4891
4909
|
function useAssignUser() {
|
|
4892
4910
|
var commentElement = useCommentUtils();
|
|
4893
4911
|
return {
|
|
4894
|
-
assignUser: function (
|
|
4912
|
+
assignUser: function (request) {
|
|
4895
4913
|
return new Promise(function (resolve, reject) {
|
|
4896
4914
|
if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.assignUser))
|
|
4897
4915
|
return reject(new Error('Velt SDK is not initialized.'));
|
|
4898
|
-
commentElement.assignUser(
|
|
4916
|
+
commentElement.assignUser(request).then(resolve).catch(reject);
|
|
4899
4917
|
});
|
|
4900
4918
|
}
|
|
4901
4919
|
};
|
|
@@ -4903,11 +4921,11 @@ function useAssignUser() {
|
|
|
4903
4921
|
function useUpdatePriority() {
|
|
4904
4922
|
var commentElement = useCommentUtils();
|
|
4905
4923
|
return {
|
|
4906
|
-
updatePriority: function (
|
|
4924
|
+
updatePriority: function (request) {
|
|
4907
4925
|
return new Promise(function (resolve, reject) {
|
|
4908
4926
|
if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.updatePriority))
|
|
4909
4927
|
return reject(new Error('Velt SDK is not initialized.'));
|
|
4910
|
-
commentElement.updatePriority(
|
|
4928
|
+
commentElement.updatePriority(request).then(resolve).catch(reject);
|
|
4911
4929
|
});
|
|
4912
4930
|
}
|
|
4913
4931
|
};
|
|
@@ -4915,11 +4933,11 @@ function useUpdatePriority() {
|
|
|
4915
4933
|
function useUpdateStatus() {
|
|
4916
4934
|
var commentElement = useCommentUtils();
|
|
4917
4935
|
return {
|
|
4918
|
-
updateStatus: function (
|
|
4936
|
+
updateStatus: function (request) {
|
|
4919
4937
|
return new Promise(function (resolve, reject) {
|
|
4920
4938
|
if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.updateStatus))
|
|
4921
4939
|
return reject(new Error('Velt SDK is not initialized.'));
|
|
4922
|
-
commentElement.updateStatus(
|
|
4940
|
+
commentElement.updateStatus(request).then(resolve).catch(reject);
|
|
4923
4941
|
});
|
|
4924
4942
|
}
|
|
4925
4943
|
};
|
|
@@ -4927,11 +4945,11 @@ function useUpdateStatus() {
|
|
|
4927
4945
|
function useUpdateAccess() {
|
|
4928
4946
|
var commentElement = useCommentUtils();
|
|
4929
4947
|
return {
|
|
4930
|
-
updateAccess: function (
|
|
4948
|
+
updateAccess: function (request) {
|
|
4931
4949
|
return new Promise(function (resolve, reject) {
|
|
4932
4950
|
if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.updateAccess))
|
|
4933
4951
|
return reject(new Error('Velt SDK is not initialized.'));
|
|
4934
|
-
commentElement.updateAccess(
|
|
4952
|
+
commentElement.updateAccess(request).then(resolve).catch(reject);
|
|
4935
4953
|
});
|
|
4936
4954
|
}
|
|
4937
4955
|
};
|
|
@@ -4939,11 +4957,11 @@ function useUpdateAccess() {
|
|
|
4939
4957
|
function useResolveCommentAnnotation() {
|
|
4940
4958
|
var commentElement = useCommentUtils();
|
|
4941
4959
|
return {
|
|
4942
|
-
resolveCommentAnnotation: function (
|
|
4960
|
+
resolveCommentAnnotation: function (request) {
|
|
4943
4961
|
return new Promise(function (resolve, reject) {
|
|
4944
4962
|
if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.resolveCommentAnnotation))
|
|
4945
4963
|
return reject(new Error('Velt SDK is not initialized.'));
|
|
4946
|
-
commentElement.resolveCommentAnnotation(
|
|
4964
|
+
commentElement.resolveCommentAnnotation(request).then(resolve).catch(reject);
|
|
4947
4965
|
});
|
|
4948
4966
|
}
|
|
4949
4967
|
};
|
|
@@ -4951,11 +4969,11 @@ function useResolveCommentAnnotation() {
|
|
|
4951
4969
|
function useGetLink() {
|
|
4952
4970
|
var commentElement = useCommentUtils();
|
|
4953
4971
|
return {
|
|
4954
|
-
getLink: function (
|
|
4972
|
+
getLink: function (request) {
|
|
4955
4973
|
return new Promise(function (resolve, reject) {
|
|
4956
4974
|
if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.getLink))
|
|
4957
4975
|
return reject(new Error('Velt SDK is not initialized.'));
|
|
4958
|
-
commentElement.getLink(
|
|
4976
|
+
commentElement.getLink(request).then(resolve).catch(reject);
|
|
4959
4977
|
});
|
|
4960
4978
|
}
|
|
4961
4979
|
};
|
|
@@ -4963,11 +4981,11 @@ function useGetLink() {
|
|
|
4963
4981
|
function useCopyLink() {
|
|
4964
4982
|
var commentElement = useCommentUtils();
|
|
4965
4983
|
return {
|
|
4966
|
-
copyLink: function (
|
|
4984
|
+
copyLink: function (request) {
|
|
4967
4985
|
return new Promise(function (resolve, reject) {
|
|
4968
4986
|
if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.copyLink))
|
|
4969
4987
|
return reject(new Error('Velt SDK is not initialized.'));
|
|
4970
|
-
commentElement.copyLink(
|
|
4988
|
+
commentElement.copyLink(request).then(resolve).catch(reject);
|
|
4971
4989
|
});
|
|
4972
4990
|
}
|
|
4973
4991
|
};
|
|
@@ -4975,11 +4993,11 @@ function useCopyLink() {
|
|
|
4975
4993
|
function useAddComment() {
|
|
4976
4994
|
var commentElement = useCommentUtils();
|
|
4977
4995
|
return {
|
|
4978
|
-
addComment: function (
|
|
4996
|
+
addComment: function (request) {
|
|
4979
4997
|
return new Promise(function (resolve, reject) {
|
|
4980
4998
|
if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.addComment))
|
|
4981
4999
|
return reject(new Error('Velt SDK is not initialized.'));
|
|
4982
|
-
commentElement.addComment(
|
|
5000
|
+
commentElement.addComment(request).then(resolve).catch(reject);
|
|
4983
5001
|
});
|
|
4984
5002
|
}
|
|
4985
5003
|
};
|
|
@@ -4987,11 +5005,11 @@ function useAddComment() {
|
|
|
4987
5005
|
function useUpdateComment() {
|
|
4988
5006
|
var commentElement = useCommentUtils();
|
|
4989
5007
|
return {
|
|
4990
|
-
updateComment: function (
|
|
5008
|
+
updateComment: function (request) {
|
|
4991
5009
|
return new Promise(function (resolve, reject) {
|
|
4992
5010
|
if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.updateComment))
|
|
4993
5011
|
return reject(new Error('Velt SDK is not initialized.'));
|
|
4994
|
-
commentElement.updateComment(
|
|
5012
|
+
commentElement.updateComment(request).then(resolve).catch(reject);
|
|
4995
5013
|
});
|
|
4996
5014
|
}
|
|
4997
5015
|
};
|
|
@@ -4999,11 +5017,11 @@ function useUpdateComment() {
|
|
|
4999
5017
|
function useDeleteComment() {
|
|
5000
5018
|
var commentElement = useCommentUtils();
|
|
5001
5019
|
return {
|
|
5002
|
-
deleteComment: function (
|
|
5020
|
+
deleteComment: function (request) {
|
|
5003
5021
|
return new Promise(function (resolve, reject) {
|
|
5004
5022
|
if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.deleteComment))
|
|
5005
5023
|
return reject(new Error('Velt SDK is not initialized.'));
|
|
5006
|
-
commentElement.deleteComment(
|
|
5024
|
+
commentElement.deleteComment(request).then(resolve).catch(reject);
|
|
5007
5025
|
});
|
|
5008
5026
|
}
|
|
5009
5027
|
};
|
|
@@ -5011,11 +5029,11 @@ function useDeleteComment() {
|
|
|
5011
5029
|
function useGetComment() {
|
|
5012
5030
|
var commentElement = useCommentUtils();
|
|
5013
5031
|
return {
|
|
5014
|
-
getComment: function (
|
|
5032
|
+
getComment: function (request) {
|
|
5015
5033
|
return new Promise(function (resolve, reject) {
|
|
5016
5034
|
if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.getComment))
|
|
5017
5035
|
return reject(new Error('Velt SDK is not initialized.'));
|
|
5018
|
-
commentElement.getComment(
|
|
5036
|
+
commentElement.getComment(request).then(resolve).catch(reject);
|
|
5019
5037
|
});
|
|
5020
5038
|
}
|
|
5021
5039
|
};
|
|
@@ -5023,11 +5041,11 @@ function useGetComment() {
|
|
|
5023
5041
|
function useAddAttachment() {
|
|
5024
5042
|
var commentElement = useCommentUtils();
|
|
5025
5043
|
return {
|
|
5026
|
-
addAttachment: function (
|
|
5044
|
+
addAttachment: function (request) {
|
|
5027
5045
|
return new Promise(function (resolve, reject) {
|
|
5028
5046
|
if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.addAttachment))
|
|
5029
5047
|
return reject(new Error('Velt SDK is not initialized.'));
|
|
5030
|
-
commentElement.addAttachment(
|
|
5048
|
+
commentElement.addAttachment(request).then(resolve).catch(reject);
|
|
5031
5049
|
});
|
|
5032
5050
|
}
|
|
5033
5051
|
};
|
|
@@ -5035,11 +5053,11 @@ function useAddAttachment() {
|
|
|
5035
5053
|
function useDeleteAttachment() {
|
|
5036
5054
|
var commentElement = useCommentUtils();
|
|
5037
5055
|
return {
|
|
5038
|
-
deleteAttachment: function (
|
|
5056
|
+
deleteAttachment: function (request) {
|
|
5039
5057
|
return new Promise(function (resolve, reject) {
|
|
5040
5058
|
if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.deleteAttachment))
|
|
5041
5059
|
return reject(new Error('Velt SDK is not initialized.'));
|
|
5042
|
-
commentElement.deleteAttachment(
|
|
5060
|
+
commentElement.deleteAttachment(request).then(resolve).catch(reject);
|
|
5043
5061
|
});
|
|
5044
5062
|
}
|
|
5045
5063
|
};
|
|
@@ -5047,11 +5065,11 @@ function useDeleteAttachment() {
|
|
|
5047
5065
|
function useGetAttachment() {
|
|
5048
5066
|
var commentElement = useCommentUtils();
|
|
5049
5067
|
return {
|
|
5050
|
-
getAttachment: function (
|
|
5068
|
+
getAttachment: function (request) {
|
|
5051
5069
|
return new Promise(function (resolve, reject) {
|
|
5052
5070
|
if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.getAttachment))
|
|
5053
5071
|
return reject(new Error('Velt SDK is not initialized.'));
|
|
5054
|
-
commentElement.getAttachment(
|
|
5072
|
+
commentElement.getAttachment(request).then(resolve).catch(reject);
|
|
5055
5073
|
});
|
|
5056
5074
|
}
|
|
5057
5075
|
};
|
|
@@ -5059,11 +5077,11 @@ function useGetAttachment() {
|
|
|
5059
5077
|
function useDeleteRecording() {
|
|
5060
5078
|
var commentElement = useCommentUtils();
|
|
5061
5079
|
return {
|
|
5062
|
-
deleteRecording: function (
|
|
5080
|
+
deleteRecording: function (request) {
|
|
5063
5081
|
return new Promise(function (resolve, reject) {
|
|
5064
5082
|
if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.deleteRecording))
|
|
5065
5083
|
return reject(new Error('Velt SDK is not initialized.'));
|
|
5066
|
-
commentElement.deleteRecording(
|
|
5084
|
+
commentElement.deleteRecording(request).then(resolve).catch(reject);
|
|
5067
5085
|
});
|
|
5068
5086
|
}
|
|
5069
5087
|
};
|
|
@@ -5071,11 +5089,11 @@ function useDeleteRecording() {
|
|
|
5071
5089
|
function useGetRecording() {
|
|
5072
5090
|
var commentElement = useCommentUtils();
|
|
5073
5091
|
return {
|
|
5074
|
-
getRecording: function (
|
|
5092
|
+
getRecording: function (request) {
|
|
5075
5093
|
return new Promise(function (resolve, reject) {
|
|
5076
5094
|
if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.getRecording))
|
|
5077
5095
|
return reject(new Error('Velt SDK is not initialized.'));
|
|
5078
|
-
commentElement.getRecording(
|
|
5096
|
+
commentElement.getRecording(request).then(resolve).catch(reject);
|
|
5079
5097
|
});
|
|
5080
5098
|
}
|
|
5081
5099
|
};
|
|
@@ -5083,11 +5101,11 @@ function useGetRecording() {
|
|
|
5083
5101
|
function useAddReaction() {
|
|
5084
5102
|
var commentElement = useCommentUtils();
|
|
5085
5103
|
return {
|
|
5086
|
-
addReaction: function (
|
|
5104
|
+
addReaction: function (request) {
|
|
5087
5105
|
return new Promise(function (resolve, reject) {
|
|
5088
5106
|
if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.addReaction))
|
|
5089
5107
|
return reject(new Error('Velt SDK is not initialized.'));
|
|
5090
|
-
commentElement.addReaction(
|
|
5108
|
+
commentElement.addReaction(request).then(resolve).catch(reject);
|
|
5091
5109
|
});
|
|
5092
5110
|
}
|
|
5093
5111
|
};
|
|
@@ -5095,11 +5113,11 @@ function useAddReaction() {
|
|
|
5095
5113
|
function useDeleteReaction() {
|
|
5096
5114
|
var commentElement = useCommentUtils();
|
|
5097
5115
|
return {
|
|
5098
|
-
deleteReaction: function (
|
|
5116
|
+
deleteReaction: function (request) {
|
|
5099
5117
|
return new Promise(function (resolve, reject) {
|
|
5100
5118
|
if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.deleteReaction))
|
|
5101
5119
|
return reject(new Error('Velt SDK is not initialized.'));
|
|
5102
|
-
commentElement.deleteReaction(
|
|
5120
|
+
commentElement.deleteReaction(request).then(resolve).catch(reject);
|
|
5103
5121
|
});
|
|
5104
5122
|
}
|
|
5105
5123
|
};
|
|
@@ -5107,11 +5125,11 @@ function useDeleteReaction() {
|
|
|
5107
5125
|
function useToggleReaction() {
|
|
5108
5126
|
var commentElement = useCommentUtils();
|
|
5109
5127
|
return {
|
|
5110
|
-
toggleReaction: function (
|
|
5128
|
+
toggleReaction: function (request) {
|
|
5111
5129
|
return new Promise(function (resolve, reject) {
|
|
5112
5130
|
if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.toggleReaction))
|
|
5113
5131
|
return reject(new Error('Velt SDK is not initialized.'));
|
|
5114
|
-
commentElement.toggleReaction(
|
|
5132
|
+
commentElement.toggleReaction(request).then(resolve).catch(reject);
|
|
5115
5133
|
});
|
|
5116
5134
|
}
|
|
5117
5135
|
};
|