@veltdev/sdk-dev 5.0.0-beta.18 → 5.0.0-beta.2
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/app/models/data/comment-actions.data.model.d.ts +0 -20
- package/app/models/data/comment-events.data.model.d.ts +0 -10
- package/app/models/data/comment-utils.data.model.d.ts +0 -26
- package/app/models/data/config.data.model.d.ts +0 -8
- package/app/models/element/comment-element.model.d.ts +10 -40
- package/app/utils/constants.d.ts +0 -1
- package/app/utils/enums.d.ts +0 -2
- package/package.json +1 -1
- package/velt.js +91 -96
|
@@ -41,29 +41,9 @@ export interface CopyLinkRequest {
|
|
|
41
41
|
annotationId: string;
|
|
42
42
|
options?: RequestOptions;
|
|
43
43
|
}
|
|
44
|
-
/**
|
|
45
|
-
* Visibility type for comment annotations.
|
|
46
|
-
* - 'public': Visible to everyone (default:velt)
|
|
47
|
-
* - 'organization': Visible only to users in the specified organization
|
|
48
|
-
* - 'self': Visible only to specified users (private comments)
|
|
49
|
-
*/
|
|
50
|
-
export type CommentVisibilityType = 'public' | 'organization' | 'self';
|
|
51
|
-
/**
|
|
52
|
-
* Configuration for comment visibility/access control.
|
|
53
|
-
*/
|
|
54
|
-
export interface CommentVisibilityConfig {
|
|
55
|
-
/** The type of visibility for the comment */
|
|
56
|
-
type: CommentVisibilityType;
|
|
57
|
-
/** Organization ID for 'organization' type visibility */
|
|
58
|
-
organizationId?: string;
|
|
59
|
-
/** User IDs for 'self' type visibility - array of user IDs who can see the comment */
|
|
60
|
-
userIds?: string[];
|
|
61
|
-
}
|
|
62
44
|
export interface AddCommentAnnotationRequest {
|
|
63
45
|
annotation: CommentAnnotation;
|
|
64
46
|
options?: RequestOptions;
|
|
65
|
-
/** Optional visibility configuration for the comment */
|
|
66
|
-
visibility?: CommentVisibilityConfig;
|
|
67
47
|
}
|
|
68
48
|
export interface PublishCommentAnnotationRequest {
|
|
69
49
|
annotationId: string;
|
|
@@ -54,7 +54,6 @@ export interface CommentSuggestionEventData {
|
|
|
54
54
|
}
|
|
55
55
|
export type CommentEventTypesMap = {
|
|
56
56
|
[CommentEventTypes.ADD_COMMENT_ANNOTATION]: AddCommentAnnotationEvent;
|
|
57
|
-
[CommentEventTypes.ADD_COMMENT_ANNOTATION_DRAFT]: AddCommentAnnotationDraftEvent;
|
|
58
57
|
[CommentEventTypes.APPROVE_COMMENT_ANNOTATION]: ApproveCommentAnnotationEvent;
|
|
59
58
|
[CommentEventTypes.ACCEPT_COMMENT_ANNOTATION]: AcceptCommentAnnotationEvent;
|
|
60
59
|
[CommentEventTypes.REJECT_COMMENT_ANNOTATION]: RejectCommentAnnotationEvent;
|
|
@@ -80,7 +79,6 @@ export type CommentEventTypesMap = {
|
|
|
80
79
|
[CommentEventTypes.COMMENT_SIDEBAR_DATA_UPDATE]: CommentSidebarDataUpdateEvent;
|
|
81
80
|
[CommentEventTypes.AUTOCOMPLETE_SEARCH]: AutocompleteSearchEvent;
|
|
82
81
|
[CommentEventTypes.COMPOSER_CLICKED]: ComposerClickedEvent;
|
|
83
|
-
[CommentEventTypes.COMPOSER_TEXT_CHANGE]: ComposerTextChangeEvent;
|
|
84
82
|
[CommentEventTypes.LINK_CLICKED]: LinkClickedEvent;
|
|
85
83
|
[CommentEventTypes.COMMENT_PIN_CLICKED]: CommentPinClickedEvent;
|
|
86
84
|
[CommentEventTypes.COMMENT_BUBBLE_CLICKED]: CommentBubbleClickedEvent;
|
|
@@ -98,10 +96,6 @@ export interface DeleteAttachmentEvent {
|
|
|
98
96
|
attachment: Attachment;
|
|
99
97
|
metadata: VeltEventMetadata;
|
|
100
98
|
}
|
|
101
|
-
export interface AddCommentAnnotationDraftEvent {
|
|
102
|
-
metadata: VeltEventMetadata;
|
|
103
|
-
addContext: (context: Record<string, unknown>) => void;
|
|
104
|
-
}
|
|
105
99
|
export interface AddCommentAnnotationEvent {
|
|
106
100
|
annotationId: string;
|
|
107
101
|
commentAnnotation: CommentAnnotation;
|
|
@@ -281,7 +275,3 @@ export interface CommentBubbleClickedEvent {
|
|
|
281
275
|
commentAnnotation: CommentAnnotation;
|
|
282
276
|
metadata?: VeltEventMetadata;
|
|
283
277
|
}
|
|
284
|
-
export interface ComposerTextChangeEvent {
|
|
285
|
-
text: string;
|
|
286
|
-
metadata?: VeltEventMetadata;
|
|
287
|
-
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Location } from './location.model';
|
|
2
1
|
export interface IUnreadCommentsMap {
|
|
3
2
|
[annotationId: string]: number;
|
|
4
3
|
}
|
|
@@ -15,28 +14,3 @@ export interface TransformContext {
|
|
|
15
14
|
inverseScale?: number;
|
|
16
15
|
};
|
|
17
16
|
}
|
|
18
|
-
/**
|
|
19
|
-
* Context data returned by the comment context provider.
|
|
20
|
-
* This is a flexible object that can contain custom properties.
|
|
21
|
-
*/
|
|
22
|
-
export interface CommentContext {
|
|
23
|
-
/**
|
|
24
|
-
* Optional comment type. When set to 'manual', the comment will be treated as a manual comment
|
|
25
|
-
* and the target element will be removed.
|
|
26
|
-
*/
|
|
27
|
-
commentType?: 'manual' | string;
|
|
28
|
-
/**
|
|
29
|
-
* Allow additional custom properties
|
|
30
|
-
*/
|
|
31
|
-
[key: string]: unknown;
|
|
32
|
-
}
|
|
33
|
-
export type CommentContextProviderResponse = CommentContext | null | undefined;
|
|
34
|
-
/**
|
|
35
|
-
* A function that provides custom context for comments.
|
|
36
|
-
* Can return the context synchronously or asynchronously via a Promise.
|
|
37
|
-
*
|
|
38
|
-
* @param documentId - The ID of the document
|
|
39
|
-
* @param location - Optional location information
|
|
40
|
-
* @returns The comment context object or a Promise that resolves to it
|
|
41
|
-
*/
|
|
42
|
-
export type CommentContextProvider = (documentId: string, location?: Location) => CommentContextProviderResponse | Promise<CommentContextProviderResponse>;
|
|
@@ -53,14 +53,6 @@ export declare class Config {
|
|
|
53
53
|
* The domain of the API proxy.
|
|
54
54
|
*/
|
|
55
55
|
apiProxyDomain?: string;
|
|
56
|
-
/**
|
|
57
|
-
* Controls whether global Velt styles are loaded.
|
|
58
|
-
* When true (default), global styles are applied.
|
|
59
|
-
* When false, global styles are not loaded - useful for custom styling.
|
|
60
|
-
*
|
|
61
|
-
* Default: true
|
|
62
|
-
*/
|
|
63
|
-
globalStyles?: boolean;
|
|
64
56
|
}
|
|
65
57
|
export interface ExtendedFirebaseOptions extends FirebaseOptions {
|
|
66
58
|
storeDbId: string;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
import { Observable } from "rxjs";
|
|
3
|
-
import { CommentSidebarSystemFiltersOperator, SidebarButtonCountType } from "../../utils/enums";
|
|
4
|
-
import { UploadFileData } from "../data/attachment.model";
|
|
5
|
-
import { AutocompleteData } from "../data/autocomplete.data.model";
|
|
6
|
-
import { AcceptCommentAnnotationRequest, AddAttachmentRequest, AddAttachmentResponse, AddCommentAnnotationRequest, AddCommentRequest, AddReactionRequest, ApproveCommentAnnotationRequest, AssignUserEvent, AssignUserRequest, CommentRequestQuery, CommentVisibilityConfig, CopyLinkRequest, DeleteAttachmentRequest, DeleteCommentAnnotationRequest, DeleteCommentRequest, DeleteReactionRequest, DeleteRecordingRequest, FetchCommentAnnotationsRequest, GetAttachmentRequest, GetCommentRequest, GetLinkRequest, GetRecordingRequest, PublishCommentAnnotationRequest, RejectCommentAnnotationRequest, ResolveCommentAnnotationRequest, SubscribeCommentAnnotationRequest, ToggleReactionRequest, UnsubscribeCommentAnnotationRequest, UpdateAccessRequest, UpdateCommentRequest, UpdatePriorityRequest, UpdateStatusRequest } from "../data/comment-actions.data.model";
|
|
7
3
|
import { CommentAnnotation, CommentOnElementConfig, CommentSelectionChangeData, ManualCommentAnnotationConfig, UpdateContextConfig } from "../data/comment-annotation.data.model";
|
|
8
|
-
import { AcceptCommentAnnotationEvent, AddCommentAnnotationEvent, AddCommentEvent, AddReactionEvent, ApproveCommentAnnotationEvent, CommentAddEventData, CommentEventTypesMap, CommentUpdateEventData, CopyLinkEvent, DeleteAttachmentEvent, DeleteCommentAnnotationEvent, DeleteCommentEvent, DeleteReactionEvent, DeleteRecordingEvent,
|
|
9
|
-
import { CommentSidebarCustomActionEventData, CommentSidebarData, CommentSidebarDataOptions } from "../data/comment-sidebar-config.model";
|
|
10
|
-
import { CommentContextProvider, TransformContext, UnreadCommentsCount } from "../data/comment-utils.data.model";
|
|
11
|
-
import { CustomAnnotationDropdownData } from "../data/custom-chip-dropdown.data.model";
|
|
4
|
+
import { AcceptCommentAnnotationEvent, AddCommentAnnotationEvent, AddCommentEvent, AddReactionEvent, ApproveCommentAnnotationEvent, CommentAddEventData, CommentEventTypesMap, CommentUpdateEventData, CopyLinkEvent, DeleteAttachmentEvent, DeleteCommentAnnotationEvent, DeleteCommentEvent, DeleteReactionEvent, DeleteRecordingEvent, GetLinkEvent, RejectCommentAnnotationEvent, ToggleReactionEvent, UpdateAccessEvent, UpdateCommentEvent, UpdatePriorityEvent, UpdateStatusEvent, GetCommentAnnotationsResponse, GetCommentAnnotationsCountResponse, FetchCommentAnnotationsResponse, PublishCommentAnnotationEvent } from "../data/comment-events.data.model";
|
|
12
5
|
import { CustomCategory, CustomPriority, CustomStatus } from "../data/custom-filter.data.model";
|
|
13
|
-
|
|
6
|
+
import { CustomAnnotationDropdownData } from "../data/custom-chip-dropdown.data.model";
|
|
7
|
+
import { AutocompleteData } from "../data/autocomplete.data.model";
|
|
8
|
+
import { CommentSidebarCustomActionEventData, CommentSidebarData, CommentSidebarDataOptions } from "../data/comment-sidebar-config.model";
|
|
9
|
+
export { ReactionMap } from '../data/reaction-annotation.data.model';
|
|
10
|
+
import { AcceptCommentAnnotationRequest, AddAttachmentRequest, AddAttachmentResponse, AddCommentAnnotationRequest, AddCommentRequest, AddReactionRequest, ApproveCommentAnnotationRequest, AssignUserRequest, AssignUserEvent, CopyLinkRequest, DeleteAttachmentRequest, DeleteCommentAnnotationRequest, CommentRequestQuery, CommentRequestQuery, DeleteCommentRequest, DeleteReactionRequest, DeleteRecordingRequest, GetAttachmentRequest, GetCommentRequest, GetLinkRequest, GetRecordingRequest, RejectCommentAnnotationRequest, ResolveCommentAnnotationRequest, SubscribeCommentAnnotationRequest, UnsubscribeCommentAnnotationRequest, ToggleReactionRequest, UpdateAccessRequest, UpdateCommentRequest, UpdatePriorityRequest, UpdateStatusRequest, FetchCommentAnnotationsRequest, PublishCommentAnnotationRequest } from "../data/comment-actions.data.model";
|
|
11
|
+
import { UnreadCommentsCount, TransformContext } from "../data/comment-utils.data.model";
|
|
12
|
+
import { CommentSidebarSystemFiltersOperator, SidebarButtonCountType } from "../../utils/enums";
|
|
13
|
+
import { UploadFileData } from "../data/attachment.model";
|
|
14
14
|
|
|
15
15
|
export declare class CommentElement {
|
|
16
16
|
/**
|
|
@@ -329,7 +329,7 @@ export declare class CommentElement {
|
|
|
329
329
|
* @description Sets the comment context provider
|
|
330
330
|
* @param provider
|
|
331
331
|
*/
|
|
332
|
-
public setContextProvider: (provider:
|
|
332
|
+
public setContextProvider: (provider: (documentId: string, location?: any) => any) => void;
|
|
333
333
|
|
|
334
334
|
/**
|
|
335
335
|
* To enable suggestion mode
|
|
@@ -823,14 +823,6 @@ export declare class CommentElement {
|
|
|
823
823
|
*/
|
|
824
824
|
public updateContext: (annotationId: string, context: any, config?: UpdateContextConfig) => Promise<any>;
|
|
825
825
|
|
|
826
|
-
/**
|
|
827
|
-
* Updates the visibility of a comment annotation.
|
|
828
|
-
* @param annotationId Annotation Id
|
|
829
|
-
* @param visibility Visibility configuration (public, organization, or self)
|
|
830
|
-
* @returns Promise<any>
|
|
831
|
-
*/
|
|
832
|
-
public updateVisibility: (annotationId: string, visibility: CommentVisibilityConfig) => Promise<any>;
|
|
833
|
-
|
|
834
826
|
/**
|
|
835
827
|
* Subscribe to selected comments
|
|
836
828
|
* @returns list of selected comments
|
|
@@ -1277,13 +1269,6 @@ export declare class CommentElement {
|
|
|
1277
1269
|
*/
|
|
1278
1270
|
public disableScreenshot: () => void;
|
|
1279
1271
|
|
|
1280
|
-
/**
|
|
1281
|
-
* To programmatically submit a comment from a velt-comment-composer.
|
|
1282
|
-
* Finds the composer within the element identified by referenceId and submits its content.
|
|
1283
|
-
* @param referenceId The ID of the HTML element containing the velt-comment-composer
|
|
1284
|
-
*/
|
|
1285
|
-
public submitComment: (referenceId: string) => void;
|
|
1286
|
-
|
|
1287
1272
|
/**
|
|
1288
1273
|
* To enable paginated contact list
|
|
1289
1274
|
*/
|
|
@@ -2095,14 +2080,6 @@ export declare class CommentElement {
|
|
|
2095
2080
|
*/
|
|
2096
2081
|
private _updateContext;
|
|
2097
2082
|
|
|
2098
|
-
/**
|
|
2099
|
-
* Updates the visibility of a comment annotation.
|
|
2100
|
-
* @param annotationId Annotation Id
|
|
2101
|
-
* @param visibility Visibility configuration (public, organization, or self)
|
|
2102
|
-
* @returns Promise<any>
|
|
2103
|
-
*/
|
|
2104
|
-
private _updateVisibility;
|
|
2105
|
-
|
|
2106
2083
|
/**
|
|
2107
2084
|
* Subscribe to selected comments
|
|
2108
2085
|
* @returns list of selected comments
|
|
@@ -2559,11 +2536,4 @@ export declare class CommentElement {
|
|
|
2559
2536
|
* To disable paginated contact list
|
|
2560
2537
|
*/
|
|
2561
2538
|
private _disablePaginatedContactList;
|
|
2562
|
-
|
|
2563
|
-
/**
|
|
2564
|
-
* To programmatically submit a comment from a velt-comment-composer.
|
|
2565
|
-
* Finds the composer within the element identified by referenceId and submits its content.
|
|
2566
|
-
* @param referenceId The ID of the HTML element containing the velt-comment-composer
|
|
2567
|
-
*/
|
|
2568
|
-
private _submitComment;
|
|
2569
2539
|
}
|
package/app/utils/constants.d.ts
CHANGED
|
@@ -11,7 +11,6 @@ export declare class Constants {
|
|
|
11
11
|
static LISTENER_BATCH_SIZE: number;
|
|
12
12
|
static LISTENER_CONTEXT_BATCH_SIZE: number;
|
|
13
13
|
static DEFAULT_VELT_CONTEXT: string;
|
|
14
|
-
static VISIBILITY_SELF_PREFIX: string;
|
|
15
14
|
static FIREBASE_PARTIAL_PATH_ORGANIZATIONS: string;
|
|
16
15
|
static FIREBASE_PARTIAL_PATH_FOLDERS: string;
|
|
17
16
|
static FIREBASE_PARTIAL_PATH_DOCS: string;
|
package/app/utils/enums.d.ts
CHANGED
|
@@ -30,7 +30,6 @@ export declare enum ResolverActions {
|
|
|
30
30
|
}
|
|
31
31
|
export declare const CommentEventTypes: {
|
|
32
32
|
readonly ADD_COMMENT_ANNOTATION: "addCommentAnnotation";
|
|
33
|
-
readonly ADD_COMMENT_ANNOTATION_DRAFT: "addCommentAnnotationDraft";
|
|
34
33
|
readonly PUBLISH_COMMENT_ANNOTATION: "publishCommentAnnotation";
|
|
35
34
|
readonly DELETE_COMMENT_ANNOTATION: "deleteCommentAnnotation";
|
|
36
35
|
readonly APPROVE_COMMENT_ANNOTATION: "approveCommentAnnotation";
|
|
@@ -57,7 +56,6 @@ export declare const CommentEventTypes: {
|
|
|
57
56
|
readonly COMMENT_SIDEBAR_DATA_UPDATE: "commentSidebarDataUpdate";
|
|
58
57
|
readonly AUTOCOMPLETE_SEARCH: "autocompleteSearch";
|
|
59
58
|
readonly COMPOSER_CLICKED: "composerClicked";
|
|
60
|
-
readonly COMPOSER_TEXT_CHANGE: "composerTextChange";
|
|
61
59
|
readonly LINK_CLICKED: "linkClicked";
|
|
62
60
|
readonly COMMENT_PIN_CLICKED: "commentPinClicked";
|
|
63
61
|
readonly COMMENT_BUBBLE_CLICKED: "commentBubbleClicked";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veltdev/sdk-dev",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.2",
|
|
4
4
|
"description": "Velt is an SDK to add collaborative features to your product within minutes. Example: Comments like Figma, Frame.io, Google docs or sheets, Recording like Loom, Huddles like Slack and much more.",
|
|
5
5
|
"homepage": "https://velt.dev",
|
|
6
6
|
"keywords": [
|