@veltdev/types-dev 5.0.0-beta.32 → 5.0.0-beta.34
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 +26 -0
- package/app/models/data/comment-annotation.data.model.d.ts +1 -0
- package/app/models/data/comment-events.data.model.d.ts +24 -1
- package/app/models/element/comment-element.model.d.ts +133 -14
- package/app/models/element/notification-element.model.d.ts +4 -4
- package/app/utils/enums.d.ts +5 -2
- package/package.json +1 -1
|
@@ -218,6 +218,32 @@ export interface ToggleReactionRequest {
|
|
|
218
218
|
};
|
|
219
219
|
options?: RequestOptions;
|
|
220
220
|
}
|
|
221
|
+
export interface SubmitCommentRequest {
|
|
222
|
+
targetComposerElementId: string;
|
|
223
|
+
}
|
|
224
|
+
export interface ClearComposerRequest {
|
|
225
|
+
targetComposerElementId: string;
|
|
226
|
+
}
|
|
227
|
+
export interface GetComposerDataRequest {
|
|
228
|
+
targetComposerElementId: string;
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* FormatConfig - Configuration for format options
|
|
232
|
+
*/
|
|
233
|
+
export interface FormatConfig {
|
|
234
|
+
bold?: {
|
|
235
|
+
enable: boolean;
|
|
236
|
+
};
|
|
237
|
+
italic?: {
|
|
238
|
+
enable: boolean;
|
|
239
|
+
};
|
|
240
|
+
underline?: {
|
|
241
|
+
enable: boolean;
|
|
242
|
+
};
|
|
243
|
+
strikethrough?: {
|
|
244
|
+
enable: boolean;
|
|
245
|
+
};
|
|
246
|
+
}
|
|
221
247
|
export interface FetchCommentAnnotationsRequest {
|
|
222
248
|
createdAfter?: number;
|
|
223
249
|
createdBefore?: number;
|
|
@@ -184,6 +184,7 @@ export declare class CommentAnnotation {
|
|
|
184
184
|
unsubscribedUsers?: CommentAnnotationUnsubscribedUsers;
|
|
185
185
|
subscribedGroups?: CommentAnnotationSubscribedGroups;
|
|
186
186
|
resolvedByUserId?: string | null;
|
|
187
|
+
resolvedByUser?: User | null;
|
|
187
188
|
multiThreadAnnotationId?: string;
|
|
188
189
|
isDraft?: boolean;
|
|
189
190
|
sourceId?: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CommentAccessMode, CommentEventTypes, CommentStatus } from "../../utils/enums";
|
|
1
|
+
import { AssignToType, CommentAccessMode, CommentEventTypes, CommentStatus } from "../../utils/enums";
|
|
2
2
|
import { Attachment } from "./attachment.model";
|
|
3
3
|
import { VeltButtonClickEvent } from "./button.data.model";
|
|
4
4
|
import { AddAttachmentResponse } from "./comment-actions.data.model";
|
|
@@ -84,6 +84,8 @@ export type CommentEventTypesMap = {
|
|
|
84
84
|
[CommentEventTypes.LINK_CLICKED]: LinkClickedEvent;
|
|
85
85
|
[CommentEventTypes.COMMENT_PIN_CLICKED]: CommentPinClickedEvent;
|
|
86
86
|
[CommentEventTypes.COMMENT_BUBBLE_CLICKED]: CommentBubbleClickedEvent;
|
|
87
|
+
[CommentEventTypes.COMMENT_TOOL_CLICK]: CommentToolClickEvent;
|
|
88
|
+
[CommentEventTypes.SIDEBAR_BUTTON_CLICK]: SidebarButtonClickEvent;
|
|
87
89
|
};
|
|
88
90
|
export interface AddAttachmentEvent {
|
|
89
91
|
annotationId: string;
|
|
@@ -283,5 +285,26 @@ export interface CommentBubbleClickedEvent {
|
|
|
283
285
|
}
|
|
284
286
|
export interface ComposerTextChangeEvent {
|
|
285
287
|
text: string;
|
|
288
|
+
annotation: CommentAnnotation;
|
|
289
|
+
targetComposerElementId: string;
|
|
290
|
+
metadata?: VeltEventMetadata;
|
|
291
|
+
}
|
|
292
|
+
export interface AssignToConfig {
|
|
293
|
+
type: AssignToType;
|
|
294
|
+
}
|
|
295
|
+
export interface PageModeComposerConfig {
|
|
296
|
+
context?: {
|
|
297
|
+
[key: string]: any;
|
|
298
|
+
} | null;
|
|
299
|
+
targetElementId?: string | null;
|
|
300
|
+
}
|
|
301
|
+
export interface CommentToolClickEvent {
|
|
302
|
+
context: {
|
|
303
|
+
[key: string]: any;
|
|
304
|
+
} | null;
|
|
305
|
+
targetElementId?: string | null;
|
|
306
|
+
metadata?: VeltEventMetadata;
|
|
307
|
+
}
|
|
308
|
+
export interface SidebarButtonClickEvent {
|
|
286
309
|
metadata?: VeltEventMetadata;
|
|
287
310
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
import { Observable } from "rxjs";
|
|
3
|
-
import { CommentSidebarSystemFiltersOperator, SidebarButtonCountType } from "../../utils/enums";
|
|
3
|
+
import { AssignToType, CommentSidebarSystemFiltersOperator, SidebarButtonCountType } from "../../utils/enums";
|
|
4
4
|
import { UploadFileData } from "../data/attachment.model";
|
|
5
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";
|
|
6
|
+
import { AcceptCommentAnnotationRequest, AddAttachmentRequest, AddAttachmentResponse, AddCommentAnnotationRequest, AddCommentRequest, AddReactionRequest, ApproveCommentAnnotationRequest, AssignUserEvent, AssignUserRequest, ClearComposerRequest, CommentRequestQuery, CommentVisibilityConfig, CopyLinkRequest, DeleteAttachmentRequest, DeleteCommentAnnotationRequest, DeleteCommentRequest, DeleteReactionRequest, DeleteRecordingRequest, FetchCommentAnnotationsRequest, GetAttachmentRequest, GetCommentRequest, GetComposerDataRequest, GetLinkRequest, GetRecordingRequest, PublishCommentAnnotationRequest, RejectCommentAnnotationRequest, ResolveCommentAnnotationRequest, SubmitCommentRequest, SubscribeCommentAnnotationRequest, ToggleReactionRequest, UnsubscribeCommentAnnotationRequest, UpdateAccessRequest, UpdateCommentRequest, UpdatePriorityRequest, UpdateStatusRequest } from "../data/comment-actions.data.model";
|
|
7
7
|
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, FetchCommentAnnotationsResponse, GetCommentAnnotationsCountResponse, GetCommentAnnotationsResponse, GetLinkEvent, PublishCommentAnnotationEvent, RejectCommentAnnotationEvent, ToggleReactionEvent, UpdateAccessEvent, UpdateCommentEvent, UpdatePriorityEvent, UpdateStatusEvent } from "../data/comment-events.data.model";
|
|
8
|
+
import { AcceptCommentAnnotationEvent, AddCommentAnnotationEvent, AddCommentEvent, AddReactionEvent, ApproveCommentAnnotationEvent, AssignToConfig, CommentAddEventData, CommentEventTypesMap, CommentUpdateEventData, ComposerTextChangeEvent, CopyLinkEvent, DeleteAttachmentEvent, DeleteCommentAnnotationEvent, DeleteCommentEvent, DeleteReactionEvent, DeleteRecordingEvent, FetchCommentAnnotationsResponse, GetCommentAnnotationsCountResponse, GetCommentAnnotationsResponse, GetLinkEvent, PageModeComposerConfig, PublishCommentAnnotationEvent, RejectCommentAnnotationEvent, ToggleReactionEvent, UpdateAccessEvent, UpdateCommentEvent, UpdatePriorityEvent, UpdateStatusEvent } from "../data/comment-events.data.model";
|
|
9
9
|
import { CommentSidebarCustomActionEventData, CommentSidebarData, CommentSidebarDataOptions } from "../data/comment-sidebar-config.model";
|
|
10
|
-
import { CommentContextProvider, TransformContext, UnreadCommentsCount } from "../data/comment-utils.data.model";
|
|
10
|
+
import { CommentContextProvider, FormatConfig, TransformContext, UnreadCommentsCount } from "../data/comment-utils.data.model";
|
|
11
11
|
import { CustomAnnotationDropdownData } from "../data/custom-chip-dropdown.data.model";
|
|
12
12
|
import { CustomCategory, CustomPriority, CustomStatus } from "../data/custom-filter.data.model";
|
|
13
13
|
export { ReactionMap, ReactionMap } from '../data/reaction-annotation.data.model';
|
|
@@ -85,6 +85,39 @@ export declare class CommentElement {
|
|
|
85
85
|
*/
|
|
86
86
|
toggleCommentSidebar: () => any;
|
|
87
87
|
|
|
88
|
+
/**
|
|
89
|
+
* To enable context in page mode composer feature
|
|
90
|
+
* When enabled, clicking comment tool will open sidebar with page mode composer and pass context
|
|
91
|
+
*/
|
|
92
|
+
enableContextInPageModeComposer: () => void;
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* To disable context in page mode composer feature
|
|
96
|
+
*/
|
|
97
|
+
disableContextInPageModeComposer: () => void;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* To clear page mode composer context
|
|
101
|
+
*/
|
|
102
|
+
clearPageModeComposerContext: () => void;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* To set context in page mode composer
|
|
106
|
+
* @param config The page mode composer config containing context and targetElementId
|
|
107
|
+
*/
|
|
108
|
+
setContextInPageModeComposer: (config: PageModeComposerConfig | null) => void;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* To focus the page mode composer input
|
|
112
|
+
*/
|
|
113
|
+
focusPageModeComposer: () => void;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* To set assign to type for comment dialog
|
|
117
|
+
* @param config The assign to config containing type
|
|
118
|
+
*/
|
|
119
|
+
setAssignToType: (config: AssignToConfig) => void;
|
|
120
|
+
|
|
88
121
|
/**
|
|
89
122
|
* To enable moderator mode
|
|
90
123
|
*/
|
|
@@ -1276,13 +1309,6 @@ export declare class CommentElement {
|
|
|
1276
1309
|
*/
|
|
1277
1310
|
public disableScreenshot: () => void;
|
|
1278
1311
|
|
|
1279
|
-
/**
|
|
1280
|
-
* To programmatically submit a comment from a velt-comment-composer.
|
|
1281
|
-
* Finds the composer within the element identified by referenceId and submits its content.
|
|
1282
|
-
* @param referenceId The ID of the HTML element containing the velt-comment-composer
|
|
1283
|
-
*/
|
|
1284
|
-
public submitComment: (referenceId: string) => void;
|
|
1285
|
-
|
|
1286
1312
|
/**
|
|
1287
1313
|
* To enable paginated contact list
|
|
1288
1314
|
*/
|
|
@@ -1293,6 +1319,42 @@ export declare class CommentElement {
|
|
|
1293
1319
|
*/
|
|
1294
1320
|
public disablePaginatedContactList: () => void;
|
|
1295
1321
|
|
|
1322
|
+
/**
|
|
1323
|
+
* To enable format options (bold, italic, underline, strikethrough)
|
|
1324
|
+
*/
|
|
1325
|
+
public enableFormatOptions: () => void;
|
|
1326
|
+
|
|
1327
|
+
/**
|
|
1328
|
+
* To disable format options
|
|
1329
|
+
*/
|
|
1330
|
+
public disableFormatOptions: () => void;
|
|
1331
|
+
|
|
1332
|
+
/**
|
|
1333
|
+
* Set format config to control which format options are enabled
|
|
1334
|
+
* @param config FormatConfig with enable flags for each format type
|
|
1335
|
+
*/
|
|
1336
|
+
public setFormatConfig: (config: FormatConfig) => void;
|
|
1337
|
+
|
|
1338
|
+
/**
|
|
1339
|
+
* Programmatically trigger comment submission for a composer with the given targetComposerElementId
|
|
1340
|
+
* @param request SubmitCommentRequest containing targetComposerElementId
|
|
1341
|
+
*/
|
|
1342
|
+
public submitComment: (request: SubmitCommentRequest) => void;
|
|
1343
|
+
|
|
1344
|
+
/**
|
|
1345
|
+
* Programmatically clear the composer state for the given targetComposerElementId
|
|
1346
|
+
* @param request ClearComposerRequest containing targetComposerElementId
|
|
1347
|
+
*/
|
|
1348
|
+
public clearComposer: (request: ClearComposerRequest) => void;
|
|
1349
|
+
|
|
1350
|
+
/**
|
|
1351
|
+
* Get the current composer data for a given targetComposerElementId
|
|
1352
|
+
* Returns the same data as COMPOSER_TEXT_CHANGE event but as a one-time fetch
|
|
1353
|
+
* @param request GetComposerDataRequest containing targetComposerElementId
|
|
1354
|
+
* @returns The composer data or null if not found
|
|
1355
|
+
*/
|
|
1356
|
+
public getComposerData: (request: GetComposerDataRequest) => ComposerTextChangeEvent | null;
|
|
1357
|
+
|
|
1296
1358
|
constructor();
|
|
1297
1359
|
/**
|
|
1298
1360
|
* Subscribe to comments on the current document.
|
|
@@ -2558,11 +2620,68 @@ export declare class CommentElement {
|
|
|
2558
2620
|
* To disable paginated contact list
|
|
2559
2621
|
*/
|
|
2560
2622
|
private _disablePaginatedContactList;
|
|
2623
|
+
/**
|
|
2624
|
+
* To enable format options (bold, italic, underline, strikethrough)
|
|
2625
|
+
*/
|
|
2626
|
+
private _enableFormatOptions;
|
|
2627
|
+
/**
|
|
2628
|
+
* To disable format options
|
|
2629
|
+
*/
|
|
2630
|
+
private _disableFormatOptions;
|
|
2631
|
+
/**
|
|
2632
|
+
* To set format config to control which format options are enabled
|
|
2633
|
+
* @param config FormatConfig with enable flags for each format type
|
|
2634
|
+
*/
|
|
2635
|
+
private _setFormatConfig;
|
|
2561
2636
|
|
|
2562
2637
|
/**
|
|
2563
|
-
*
|
|
2564
|
-
*
|
|
2565
|
-
* @param referenceId The ID of the HTML element containing the velt-comment-composer
|
|
2638
|
+
* Programmatically trigger comment submission for a composer with the given targetComposerElementId
|
|
2639
|
+
* @param request SubmitCommentRequest containing targetComposerElementId
|
|
2566
2640
|
*/
|
|
2567
2641
|
private _submitComment;
|
|
2642
|
+
|
|
2643
|
+
/**
|
|
2644
|
+
* Programmatically clear the composer state for the given targetComposerElementId
|
|
2645
|
+
* @param request ClearComposerRequest containing targetComposerElementId
|
|
2646
|
+
*/
|
|
2647
|
+
private _clearComposer;
|
|
2648
|
+
|
|
2649
|
+
/**
|
|
2650
|
+
* Get the current composer data for a given targetComposerElementId
|
|
2651
|
+
* Returns the same data as COMPOSER_TEXT_CHANGE event but as a one-time fetch
|
|
2652
|
+
* @param request GetComposerDataRequest containing targetComposerElementId
|
|
2653
|
+
* @returns The composer data or null if not found
|
|
2654
|
+
*/
|
|
2655
|
+
private _getComposerData;
|
|
2656
|
+
|
|
2657
|
+
/**
|
|
2658
|
+
* To enable context in page mode composer feature
|
|
2659
|
+
*/
|
|
2660
|
+
private _enableContextInPageModeComposer;
|
|
2661
|
+
|
|
2662
|
+
/**
|
|
2663
|
+
* To disable context in page mode composer feature
|
|
2664
|
+
*/
|
|
2665
|
+
private _disableContextInPageModeComposer;
|
|
2666
|
+
|
|
2667
|
+
/**
|
|
2668
|
+
* To clear page mode composer context
|
|
2669
|
+
*/
|
|
2670
|
+
private _clearPageModeComposerContext;
|
|
2671
|
+
|
|
2672
|
+
/**
|
|
2673
|
+
* To set context in page mode composer
|
|
2674
|
+
*/
|
|
2675
|
+
private _setContextInPageModeComposer;
|
|
2676
|
+
|
|
2677
|
+
/**
|
|
2678
|
+
* To focus the page mode composer input
|
|
2679
|
+
*/
|
|
2680
|
+
private _focusPageModeComposer;
|
|
2681
|
+
|
|
2682
|
+
/**
|
|
2683
|
+
* To set assign to type for comment dialog
|
|
2684
|
+
* @param type 'dropdown' | 'checkbox'
|
|
2685
|
+
*/
|
|
2686
|
+
private _setAssignToType;
|
|
2568
2687
|
}
|
|
@@ -71,12 +71,12 @@ export declare class NotificationElement {
|
|
|
71
71
|
/**
|
|
72
72
|
* To enable settings config by organization
|
|
73
73
|
*/
|
|
74
|
-
|
|
74
|
+
enableSettingsAtOrganizationLevel: () => void;
|
|
75
75
|
|
|
76
76
|
/**
|
|
77
77
|
* To disable settings config by organization
|
|
78
78
|
*/
|
|
79
|
-
|
|
79
|
+
disableSettingsAtOrganizationLevel: () => void;
|
|
80
80
|
|
|
81
81
|
/**
|
|
82
82
|
* To mute all notifications
|
|
@@ -213,12 +213,12 @@ export declare class NotificationElement {
|
|
|
213
213
|
/**
|
|
214
214
|
* To enable settings config by organization
|
|
215
215
|
*/
|
|
216
|
-
private
|
|
216
|
+
private _enableSettingsAtOrganizationLevel;
|
|
217
217
|
|
|
218
218
|
/**
|
|
219
219
|
* To disable settings config by organization
|
|
220
220
|
*/
|
|
221
|
-
private
|
|
221
|
+
private _disableSettingsAtOrganizationLevel;
|
|
222
222
|
|
|
223
223
|
/**
|
|
224
224
|
* To enable self notifications
|
package/app/utils/enums.d.ts
CHANGED
|
@@ -61,6 +61,8 @@ export declare const CommentEventTypes: {
|
|
|
61
61
|
readonly LINK_CLICKED: "linkClicked";
|
|
62
62
|
readonly COMMENT_PIN_CLICKED: "commentPinClicked";
|
|
63
63
|
readonly COMMENT_BUBBLE_CLICKED: "commentBubbleClicked";
|
|
64
|
+
readonly COMMENT_TOOL_CLICK: "commentToolClick";
|
|
65
|
+
readonly SIDEBAR_BUTTON_CLICK: "sidebarButtonClick";
|
|
64
66
|
};
|
|
65
67
|
export declare const RecorderEventTypes: {
|
|
66
68
|
readonly TRANSCRIPTION_DONE: "transcriptionDone";
|
|
@@ -189,6 +191,7 @@ export declare enum AnalyticsFeatures {
|
|
|
189
191
|
COMMENT_SIDEBAR = "commentSidebar"
|
|
190
192
|
}
|
|
191
193
|
export type FeatureType = 'area' | 'arrow' | 'audioHuddle' | 'comment' | 'cursor' | 'huddle' | 'liveStateSync' | 'presence' | 'recorder' | 'rewriter' | 'tag' | 'liveSelection' | 'notification' | 'reaction' | 'multiThread';
|
|
194
|
+
export type AssignToType = 'dropdown' | 'checkbox';
|
|
192
195
|
export declare enum DeviceType {
|
|
193
196
|
DESKTOP = "Desktop",
|
|
194
197
|
MOBILE = "Mobile",
|
|
@@ -281,10 +284,10 @@ export type OverlayOriginY = 'top' | 'center' | 'bottom';
|
|
|
281
284
|
export type OverlayOriginX = 'start' | 'center' | 'end';
|
|
282
285
|
export type SubtitlesMode = 'floating' | 'embed';
|
|
283
286
|
export type RecorderVariant = 'default' | 'embed';
|
|
284
|
-
export type ReactionPinType = 'timeline' | 'comment';
|
|
287
|
+
export type ReactionPinType = 'timeline' | 'comment' | 'standalone';
|
|
285
288
|
export type SidebarPosition = 'left' | 'right';
|
|
286
289
|
export type SidebarSortingCriteria = 'date' | 'unread' | null;
|
|
287
|
-
export type SidebarFilterCriteria = 'all' | 'read' | 'unread' | 'resolved' | 'open' | 'reset' | null;
|
|
290
|
+
export type SidebarFilterCriteria = 'all' | 'read' | 'unread' | 'resolved' | 'open' | 'assignedToMe' | 'reset' | null;
|
|
288
291
|
export type SidebarFilterSearchType = 'people' | 'assigned' | 'tagged' | 'involved' | 'pages' | 'documents' | 'statuses' | 'priorities' | 'categories' | 'versions' | string;
|
|
289
292
|
export type InlineSortingCriteria = 'createdFirst' | 'createdLast' | 'updatedFirst' | 'updatedLast';
|
|
290
293
|
export type NotificationPanelMode = 'popover' | 'sidebar';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veltdev/types-dev",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.34",
|
|
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": [
|