@veltdev/sdk-staging 4.0.0-beta.102 → 4.0.0-beta.104

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.
@@ -31,173 +31,173 @@ import { FetchDocumentsResponse, FetchFoldersResponse } from "../models/data/doc
31
31
  import { UserDataProvider } from "../models/data/user-resolver.data.model";
32
32
 
33
33
  export declare class Snippyly {
34
- constructor();
35
- initConfig: (apiKey: string, config?: Config) => void;
36
- identify: (user: User, userOptions?: UserOptions) => Promise<unknown>;
37
- /**
38
- * Tell us who the currently logged in user is.
39
- *
40
- * Call whenever the user is updated: signs in, signs out, signs up etc.
41
- * @deprecated This method is deprecated.
42
- */
43
- updateUser: (user: User) => void;
44
- /**
45
- * Tell us the unique ID of the current document/resource on which you want to enable collaboration.
46
- * @param id unique document ID
47
- * @param documentMetadata Document Metadata
48
- */
49
- setDocument: (id: string, documentMetadata?: DocumentMetadata) => void;
50
- /**
51
- * Tell us the unique ID of the current document/resource on which you want to enable collaboration.
52
- * @param id unique document ID
53
- * @deprecated This method is deprecated. Use `setDocuments` method instead.
54
- */
55
- setDocumentId: (id: string) => void;
56
- /**
57
- * To set multiple documents
58
- */
59
- setDocuments: (documents: Document[], options?: SetDocumentsRequestOptions) => void;
60
- /**
61
- * To unset the document id
62
- * @deprecated This method is deprecated. Use `unsetDocuments` method instead.
63
- */
64
- unsetDocumentId: () => void;
65
- /**
66
- * To unset the documents
67
- */
68
- unsetDocuments: () => void;
69
- /**
70
- * To fetch documents
71
- */
72
- fetchDocuments: (options?: FetchDocumentsRequest) => Promise<FetchDocumentsResponse>;
73
- /**
74
- * To fetch folders
75
- */
76
- fetchFolders: (options?: FetchFoldersRequest) => Promise<FetchFoldersResponse>;
77
- /**
78
- * To set the user data provider.
79
- */
80
- setUserDataProvider: (userDataProvider: UserDataProvider) => void;
81
- /**
82
- * Get Document ID
83
- */
84
- getDocumentId: () => string;
85
- /**
86
- * Tell us the custom params of the current document/resource to identify sub document inside a document.
87
- * @param params Location
88
- * @param appendLocation Append location to existing location
89
- */
90
- setLocation: (params: Location, appendLocation?: boolean) => void;
91
- /**
92
- * To remove location from a User
93
- * @param location Location
94
- */
95
- removeLocation: (location?: Location) => void;
96
- /**
97
- * To exclude data of specific location ids
98
- * @param ids Location Ids
99
- */
100
- excludeLocationIds: (ids: string[]) => void;
101
- /**
102
- * Tell us the about the scrollable document ids to keep track on its scroll changes
103
- * @param ids scrollable elements ids
104
- */
105
- setScrollableElementsIds: (ids: string[]) => void;
106
- /**
107
- * To remove document params from a User
108
- */
109
- removeScrollableElementsIds: () => void;
110
- /**
111
- * Get the Presence Element Object to access the raw presence data.
112
- *
113
- * This is for Pros who don’t want to use Snippyly Presence web component and want to design their own UI.
114
- */
115
- getPresenceElement: () => PresenceElement;
116
- /**
117
- * Get the Cursor Element Object to access the raw cursor data.
118
- *
119
- * This is for Pros who don’t want to use Snippyly Presence web component and want to design their own UI.
120
- */
121
- getCursorElement: () => CursorElement;
122
- /**
123
- * Get the Comment Element Object to access the raw comment data.
124
- *
125
- * This is for Pros who don’t want to use Snippyly Comment web component and want to design their own UI.
126
- */
127
- getCommentElement: () => CommentElement;
128
- /**
129
- * Get the Tag Pin Annotation Object to access the raw tag data.
130
- *
131
- * This is for Pros who don’t want to use Snippyly Tag web component and want to design their own UI.
132
- */
133
- getTagElement: () => TagElement;
134
- /**
135
- * Get the Selection Object to enable/disable the feature.
136
- */
137
- getSelectionElement: () => SelectionElement;
138
- /**
139
- * Get the Recorder Object.
140
- */
141
- getRecorderElement: () => RecorderElement;
142
- /**
143
- * Get the Contact Object.
144
- */
145
- getContactElement: () => ContactElement;
146
- /**
147
- * Get the Rewriter Object.
148
- */
149
- getRewriterElement: () => RewriterElement;
150
- /**
151
- * Get the Huddle element.
152
- */
153
- getHuddleElement: () => HuddleElement;
154
- /**
155
- * Get the LiveStateSync Object.
156
- */
157
- getLiveStateSyncElement: () => LiveStateSyncElement;
158
- /**
159
- * Get the Arrow Object.
160
- */
161
- getArrowElement: () => ArrowElement;
162
- /**
163
- * Get the Views Object.
164
- */
165
- getViewsElement: () => ViewsElement;
166
- /**
167
- * Get the Notification Object.
168
- */
169
- getNotificationElement: () => NotificationElement;
170
- /**
171
- * Get the Autocomplete Object.
172
- */
173
- getAutocompleteElement: () => AutocompleteElement;
174
- /**
175
- * Get the Area Object.
176
- */
177
- getAreaElement: () => AreaElement;
178
- /**
179
- * Get the Area Object.
180
- */
181
- getReactionElement: () => ReactionElement;
182
- /**
183
- * Get the metadata of the current resource.
184
- */
185
- getMetadata: () => Promise<VeltEventMetadata | null>;
186
- /**
187
- * To signout a user
188
- */
189
- signOutUser: () => any;
190
- /**
191
- * Provide a list of features to disable.
192
- * Provide an empty array to enable all the features.
193
- * @param features List of features
194
- */
195
- disableFeatures: (features: Array<FeatureType>) => void;
196
- /**
197
- * To set the dark mode of Velt components.
198
- * @param value {boolean} true/false
199
- */
200
- setDarkMode: (darkMode: boolean) => void;
34
+ constructor();
35
+ initConfig: (apiKey: string, config?: Config) => void;
36
+ identify: (user: User, userOptions?: UserOptions) => Promise<unknown>;
37
+ /**
38
+ * Tell us who the currently logged in user is.
39
+ *
40
+ * Call whenever the user is updated: signs in, signs out, signs up etc.
41
+ * @deprecated This method is deprecated.
42
+ */
43
+ updateUser: (user: User) => void;
44
+ /**
45
+ * Tell us the unique ID of the current document/resource on which you want to enable collaboration.
46
+ * @param id unique document ID
47
+ * @param documentMetadata Document Metadata
48
+ */
49
+ setDocument: (id: string, documentMetadata?: DocumentMetadata) => void;
50
+ /**
51
+ * Tell us the unique ID of the current document/resource on which you want to enable collaboration.
52
+ * @param id unique document ID
53
+ * @deprecated This method is deprecated. Use `setDocuments` method instead.
54
+ */
55
+ setDocumentId: (id: string) => void;
56
+ /**
57
+ * To set multiple documents
58
+ */
59
+ setDocuments: (documents: Document[], options?: SetDocumentsRequestOptions) => void;
60
+ /**
61
+ * To unset the document id
62
+ * @deprecated This method is deprecated. Use `unsetDocuments` method instead.
63
+ */
64
+ unsetDocumentId: () => void;
65
+ /**
66
+ * To unset the documents
67
+ */
68
+ unsetDocuments: () => void;
69
+ /**
70
+ * To fetch documents
71
+ */
72
+ fetchDocuments: (options?: FetchDocumentsRequest) => Promise<FetchDocumentsResponse>;
73
+ /**
74
+ * To fetch folders
75
+ */
76
+ fetchFolders: (options?: FetchFoldersRequest) => Promise<FetchFoldersResponse>;
77
+ /**
78
+ * To set the user data provider.
79
+ */
80
+ setUserDataProvider: (userDataProvider: UserDataProvider) => void;
81
+ /**
82
+ * Get Document ID
83
+ */
84
+ getDocumentId: () => string;
85
+ /**
86
+ * Tell us the custom params of the current document/resource to identify sub document inside a document.
87
+ * @param params Location
88
+ * @param appendLocation Append location to existing location
89
+ */
90
+ setLocation: (params: Location, appendLocation?: boolean) => void;
91
+ /**
92
+ * To remove location from a User
93
+ * @param location Location
94
+ */
95
+ removeLocation: (location?: Location) => void;
96
+ /**
97
+ * To exclude data of specific location ids
98
+ * @param ids Location Ids
99
+ */
100
+ excludeLocationIds: (ids: string[]) => void;
101
+ /**
102
+ * Tell us the about the scrollable document ids to keep track on its scroll changes
103
+ * @param ids scrollable elements ids
104
+ */
105
+ setScrollableElementsIds: (ids: string[]) => void;
106
+ /**
107
+ * To remove document params from a User
108
+ */
109
+ removeScrollableElementsIds: () => void;
110
+ /**
111
+ * Get the Presence Element Object to access the raw presence data.
112
+ *
113
+ * This is for Pros who don’t want to use Snippyly Presence web component and want to design their own UI.
114
+ */
115
+ getPresenceElement: () => PresenceElement;
116
+ /**
117
+ * Get the Cursor Element Object to access the raw cursor data.
118
+ *
119
+ * This is for Pros who don’t want to use Snippyly Presence web component and want to design their own UI.
120
+ */
121
+ getCursorElement: () => CursorElement;
122
+ /**
123
+ * Get the Comment Element Object to access the raw comment data.
124
+ *
125
+ * This is for Pros who don’t want to use Snippyly Comment web component and want to design their own UI.
126
+ */
127
+ getCommentElement: () => CommentElement;
128
+ /**
129
+ * Get the Tag Pin Annotation Object to access the raw tag data.
130
+ *
131
+ * This is for Pros who don’t want to use Snippyly Tag web component and want to design their own UI.
132
+ */
133
+ getTagElement: () => TagElement;
134
+ /**
135
+ * Get the Selection Object to enable/disable the feature.
136
+ */
137
+ getSelectionElement: () => SelectionElement;
138
+ /**
139
+ * Get the Recorder Object.
140
+ */
141
+ getRecorderElement: () => RecorderElement;
142
+ /**
143
+ * Get the Contact Object.
144
+ */
145
+ getContactElement: () => ContactElement;
146
+ /**
147
+ * Get the Rewriter Object.
148
+ */
149
+ getRewriterElement: () => RewriterElement;
150
+ /**
151
+ * Get the Huddle element.
152
+ */
153
+ getHuddleElement: () => HuddleElement;
154
+ /**
155
+ * Get the LiveStateSync Object.
156
+ */
157
+ getLiveStateSyncElement: () => LiveStateSyncElement;
158
+ /**
159
+ * Get the Arrow Object.
160
+ */
161
+ getArrowElement: () => ArrowElement;
162
+ /**
163
+ * Get the Views Object.
164
+ */
165
+ getViewsElement: () => ViewsElement;
166
+ /**
167
+ * Get the Notification Object.
168
+ */
169
+ getNotificationElement: () => NotificationElement;
170
+ /**
171
+ * Get the Autocomplete Object.
172
+ */
173
+ getAutocompleteElement: () => AutocompleteElement;
174
+ /**
175
+ * Get the Area Object.
176
+ */
177
+ getAreaElement: () => AreaElement;
178
+ /**
179
+ * Get the Area Object.
180
+ */
181
+ getReactionElement: () => ReactionElement;
182
+ /**
183
+ * Get the metadata of the current resource.
184
+ */
185
+ getMetadata: () => Promise<VeltEventMetadata | null>;
186
+ /**
187
+ * To signout a user
188
+ */
189
+ signOutUser: () => any;
190
+ /**
191
+ * Provide a list of features to disable.
192
+ * Provide an empty array to enable all the features.
193
+ * @param features List of features
194
+ */
195
+ disableFeatures: (features: Array<FeatureType>) => void;
196
+ /**
197
+ * To set the dark mode of Velt components.
198
+ * @param value {boolean} true/false
199
+ */
200
+ setDarkMode: (darkMode: boolean) => void;
201
201
 
202
202
  /**
203
203
  * To check if user allowed in provided document or not.
@@ -205,24 +205,29 @@ export declare class Snippyly {
205
205
  isUserAllowed$: () => Observable<boolean>;
206
206
 
207
207
  /**
208
- * To get user role in provided document.
208
+ * To get user.
209
209
  */
210
- getUserRole$: () => Observable<string | null>;
210
+ getUser: () => User | null;
211
211
 
212
- /**
213
- * To check if plan is expired or not.
214
- */
215
- isPlanExpired$: () => Observable<boolean>;
212
+ /**
213
+ * To get user role in provided document.
214
+ */
215
+ getUserRole$: () => Observable<string | null>;
216
216
 
217
- /**
218
- * To get if the Velt is initialized or not.
219
- * @returns Observable<boolean | undefined>
220
- */
221
- getVeltInitState: () => Observable<boolean | undefined>;
217
+ /**
218
+ * To check if plan is expired or not.
219
+ */
220
+ isPlanExpired$: () => Observable<boolean>;
222
221
 
223
- /**
224
- * To remove velt specific content from provided html content.
225
- */
222
+ /**
223
+ * To get if the Velt is initialized or not.
224
+ * @returns Observable<boolean | undefined>
225
+ */
226
+ getVeltInitState: () => Observable<boolean | undefined>;
227
+
228
+ /**
229
+ * To remove velt specific content from provided html content.
230
+ */
226
231
  removeVeltContent: (htmlContent: string) => string;
227
232
 
228
233
  /**
@@ -256,7 +261,7 @@ export declare class Snippyly {
256
261
  /**
257
262
  * To update user contact list.
258
263
  */
259
- updateContactList: (userContacts: UserContact[], config?: {merge: boolean}) => void;
264
+ updateContactList: (userContacts: UserContact[], config?: { merge: boolean }) => void;
260
265
 
261
266
  /**
262
267
  * To get document metadata.
@@ -268,4 +273,14 @@ export declare class Snippyly {
268
273
  * To subscribe to core actions
269
274
  */
270
275
  on: <T extends keyof CoreEventTypesMap>(action: T) => Observable<CoreEventTypesMap[T]>;
271
- }
276
+
277
+ /**
278
+ * To set the ui state.
279
+ */
280
+ setUiState: (uiState: { [key: string]: any }) => void;
281
+
282
+ /**
283
+ * To get the ui state.
284
+ */
285
+ getUiState: () => Observable<{ [key: string]: any }>;
286
+ }
@@ -77,6 +77,7 @@ export type CommentEventTypesMap = {
77
77
  [CommentEventTypes.TOGGLE_REACTION]: ToggleReactionEvent;
78
78
  [CommentEventTypes.COMMENT_SIDEBAR_DATA_INIT]: CommentSidebarDataInitEvent;
79
79
  [CommentEventTypes.COMMENT_SIDEBAR_DATA_UPDATE]: CommentSidebarDataUpdateEvent;
80
+ [CommentEventTypes.AUTOCOMPLETE_SEARCH]: AutocompleteSearchEvent;
80
81
  };
81
82
  export interface AddAttachmentEvent {
82
83
  annotationId: string;
@@ -238,3 +239,9 @@ export interface CommentSidebarDataInitEvent extends VeltButtonClickEvent {
238
239
  }
239
240
  export interface CommentSidebarDataUpdateEvent extends VeltButtonClickEvent {
240
241
  }
242
+ export interface AutocompleteSearchEvent {
243
+ event: KeyboardEvent | InputEvent | Event;
244
+ searchText: string;
245
+ type?: 'contact' | 'custom' | 'group';
246
+ metadata?: VeltEventMetadata;
247
+ }
@@ -1073,6 +1073,16 @@ export declare class CommentElement {
1073
1073
  */
1074
1074
  public disableReadOnly: () => void;
1075
1075
 
1076
+ /**
1077
+ * To enable custom autocomplete search
1078
+ */
1079
+ public enableCustomAutocompleteSearch: () => void;
1080
+
1081
+ /**
1082
+ * To disable custom autocomplete search
1083
+ */
1084
+ public disableCustomAutocompleteSearch: () => void;
1085
+
1076
1086
  constructor();
1077
1087
  /**
1078
1088
  * Subscribe to comments on the current document.
@@ -2127,4 +2137,14 @@ export declare class CommentElement {
2127
2137
  * To disable read only
2128
2138
  */
2129
2139
  private _disableReadOnly;
2140
+
2141
+ /**
2142
+ * To enable custom autocomplete search
2143
+ */
2144
+ private _enableCustomAutocompleteSearch;
2145
+
2146
+ /**
2147
+ * To disable custom autocomplete search
2148
+ */
2149
+ private _disableCustomAutocompleteSearch;
2130
2150
  }
@@ -41,6 +41,7 @@ export declare const CommentEventTypes: {
41
41
  readonly TOGGLE_REACTION: "toggleReaction";
42
42
  readonly COMMENT_SIDEBAR_DATA_INIT: "commentSidebarDataInit";
43
43
  readonly COMMENT_SIDEBAR_DATA_UPDATE: "commentSidebarDataUpdate";
44
+ readonly AUTOCOMPLETE_SEARCH: "autocompleteSearch";
44
45
  };
45
46
  export declare const RecorderEventTypes: {
46
47
  readonly TRANSCRIPTION_DONE: "transcriptionDone";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veltdev/sdk-staging",
3
- "version": "4.0.0-beta.102",
3
+ "version": "4.0.0-beta.104",
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": [