@veltdev/sdk 1.0.22 → 1.0.24
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/document-paths.data.model.d.ts +2 -0
- package/app/models/data/live-state-data-map.data.model.d.ts +16 -2
- package/app/models/data/live-state-data.data.model.d.ts +17 -0
- package/app/models/element/comment-element.model.d.ts +85 -25
- package/app/models/element/live-state-sync-element.model.d.ts +92 -0
- package/app/utils/constants.d.ts +5 -0
- package/package.json +1 -1
- package/velt.js +2 -2
|
@@ -1,7 +1,21 @@
|
|
|
1
|
-
import { LiveStateData } from "./live-state-data.data.model";
|
|
1
|
+
import { LiveStateData, SingleEditorLiveStateData } from "./live-state-data.data.model";
|
|
2
2
|
export declare class LiveStateDataMap {
|
|
3
3
|
/**
|
|
4
4
|
* Map of all unique LiveStateData set by you on the given document.
|
|
5
5
|
*/
|
|
6
|
-
|
|
6
|
+
custom?: {
|
|
7
|
+
[liveStateDataId: string]: LiveStateData;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Map of all unique LiveStateData set by the default editor on the given document.
|
|
11
|
+
*/
|
|
12
|
+
default?: {
|
|
13
|
+
singleEditor?: SingleEditorLiveStateData;
|
|
14
|
+
autoSyncState?: {
|
|
15
|
+
current?: LiveStateData;
|
|
16
|
+
history?: {
|
|
17
|
+
[liveStateDataId: string]: LiveStateData;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
};
|
|
7
21
|
}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
+
import { User } from "./user.data.model";
|
|
1
2
|
export declare class LiveStateData {
|
|
3
|
+
/**
|
|
4
|
+
* Unique identifier to identify the document you are syncing.
|
|
5
|
+
* This id is md5 of liveStateDataId.
|
|
6
|
+
*/
|
|
7
|
+
id: string;
|
|
2
8
|
/**
|
|
3
9
|
* Unique identifier to identify the state data you are syncing.
|
|
4
10
|
*/
|
|
@@ -8,4 +14,15 @@ export declare class LiveStateData {
|
|
|
8
14
|
*
|
|
9
15
|
*/
|
|
10
16
|
data: string | number | boolean | JSON;
|
|
17
|
+
lastUpdated: any;
|
|
18
|
+
updatedBy: User;
|
|
19
|
+
}
|
|
20
|
+
export declare class SingleEditorLiveStateData {
|
|
21
|
+
editor?: User | null;
|
|
22
|
+
requestEditorAccess?: {
|
|
23
|
+
user: User;
|
|
24
|
+
requestedAt: any;
|
|
25
|
+
status: 'pending' | 'accepted' | 'rejected';
|
|
26
|
+
waitTime: number;
|
|
27
|
+
} | null;
|
|
11
28
|
}
|
|
@@ -230,12 +230,12 @@ export declare class CommentElement {
|
|
|
230
230
|
/**
|
|
231
231
|
* To show triangle in popover mode
|
|
232
232
|
*/
|
|
233
|
-
|
|
233
|
+
public enablePopoverTriangleComponent: () => any;
|
|
234
234
|
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
235
|
+
/**
|
|
236
|
+
* To hide triangle in popover mode
|
|
237
|
+
*/
|
|
238
|
+
public disablePopoverTriangleComponent: () => any;
|
|
239
239
|
|
|
240
240
|
/**
|
|
241
241
|
* To enable dialog on hover
|
|
@@ -383,13 +383,13 @@ export declare class CommentElement {
|
|
|
383
383
|
*
|
|
384
384
|
* @deprecated Use setCustomCategory instead
|
|
385
385
|
*/
|
|
386
|
-
|
|
386
|
+
setCustomCategories: (categories: CustomCategory[]) => void;
|
|
387
387
|
|
|
388
388
|
/**
|
|
389
389
|
* @description Sets custom categories filters
|
|
390
390
|
* @param categories
|
|
391
391
|
*/
|
|
392
|
-
|
|
392
|
+
setCustomCategory: (categories: CustomCategory[]) => void;
|
|
393
393
|
|
|
394
394
|
/**
|
|
395
395
|
* To enable inbox mode
|
|
@@ -440,22 +440,52 @@ export declare class CommentElement {
|
|
|
440
440
|
/**
|
|
441
441
|
* To enable mobile mode
|
|
442
442
|
*/
|
|
443
|
-
|
|
443
|
+
public enableMobileMode: () => any;
|
|
444
444
|
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
445
|
+
/**
|
|
446
|
+
* To disable mobile mode
|
|
447
|
+
*/
|
|
448
|
+
public disableMobileMode: () => any;
|
|
449
449
|
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
450
|
+
/**
|
|
451
|
+
* To enable inline comment mode
|
|
452
|
+
*/
|
|
453
|
+
public enableInlineCommentMode: () => any;
|
|
454
|
+
|
|
455
|
+
/**
|
|
456
|
+
* To disable inline comment mode
|
|
457
|
+
*/
|
|
458
|
+
public disableInlineCommentMode: () => any;
|
|
454
459
|
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
460
|
+
/**
|
|
461
|
+
* To enable minimap
|
|
462
|
+
*/
|
|
463
|
+
public enableMinimap: () => any;
|
|
464
|
+
|
|
465
|
+
/**
|
|
466
|
+
* To disable minimap
|
|
467
|
+
*/
|
|
468
|
+
public disableMinimap: () => any;
|
|
469
|
+
|
|
470
|
+
/**
|
|
471
|
+
* To show comments on DOM
|
|
472
|
+
*/
|
|
473
|
+
public showCommentsOnDom: () => any;
|
|
474
|
+
|
|
475
|
+
/**
|
|
476
|
+
* To hide comments on DOM
|
|
477
|
+
*/
|
|
478
|
+
public hideCommentsOnDom: () => any;
|
|
479
|
+
|
|
480
|
+
/**
|
|
481
|
+
* To enable comment tool
|
|
482
|
+
*/
|
|
483
|
+
public enableCommentTool: () => any;
|
|
484
|
+
|
|
485
|
+
/**
|
|
486
|
+
* To disable comment tool
|
|
487
|
+
*/
|
|
488
|
+
public disableCommentTool: () => any;
|
|
459
489
|
constructor();
|
|
460
490
|
/**
|
|
461
491
|
* Subscribe to comments on the current document.
|
|
@@ -679,12 +709,12 @@ export declare class CommentElement {
|
|
|
679
709
|
/**
|
|
680
710
|
* To show triangle in popover mode
|
|
681
711
|
*/
|
|
682
|
-
|
|
712
|
+
private _enablePopoverTriangleComponent;
|
|
683
713
|
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
714
|
+
/**
|
|
715
|
+
* To hide triangle in popover mode
|
|
716
|
+
*/
|
|
717
|
+
private _disablePopoverTriangleComponent;
|
|
688
718
|
|
|
689
719
|
/**
|
|
690
720
|
* To enable dialog on hover
|
|
@@ -905,4 +935,34 @@ export declare class CommentElement {
|
|
|
905
935
|
* To disable inline comment mode
|
|
906
936
|
*/
|
|
907
937
|
private _disableInlineCommentMode;
|
|
938
|
+
|
|
939
|
+
/**
|
|
940
|
+
* To enable minimap
|
|
941
|
+
*/
|
|
942
|
+
private _enableMinimap;
|
|
943
|
+
|
|
944
|
+
/**
|
|
945
|
+
* To disable minimap
|
|
946
|
+
*/
|
|
947
|
+
private _disableMinimap;
|
|
948
|
+
|
|
949
|
+
/**
|
|
950
|
+
* To show comments on DOM
|
|
951
|
+
*/
|
|
952
|
+
private _showCommentsOnDom;
|
|
953
|
+
|
|
954
|
+
/**
|
|
955
|
+
* To hide comments on DOM
|
|
956
|
+
*/
|
|
957
|
+
private _hideCommentsOnDom;
|
|
958
|
+
|
|
959
|
+
/**
|
|
960
|
+
* To enable comment tool
|
|
961
|
+
*/
|
|
962
|
+
private _enableCommentTool;
|
|
963
|
+
|
|
964
|
+
/**
|
|
965
|
+
* To disable comment tool
|
|
966
|
+
*/
|
|
967
|
+
private _disableCommentTool;
|
|
908
968
|
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Represents the synchronization element for live state.
|
|
5
|
+
*/
|
|
6
|
+
export declare class LiveStateSyncElement {
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Gets live state data based on the provided ID.
|
|
10
|
+
*/
|
|
11
|
+
getLiveStateData: (liveStateDataId: string) => any;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Gets live state data as an observable based on the provided ID.
|
|
15
|
+
*/
|
|
16
|
+
getLiveStateData$: (liveStateDataId: string) => Observable<any>;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Sets live state data for the provided ID and data.
|
|
20
|
+
*/
|
|
21
|
+
setLiveStateData: (liveStateDataId: string, liveStateData: any) => any;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Enables the single editor mode.
|
|
25
|
+
*/
|
|
26
|
+
enableSingleEditorMode: () => void;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Disables the single editor mode.
|
|
30
|
+
*/
|
|
31
|
+
disableSingleEditorMode: () => void;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Checks if the current user is an editor. Returns an observable.
|
|
35
|
+
*/
|
|
36
|
+
isUserEditor$: () => Observable<boolean | null>;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Sets the current user as an editor.
|
|
40
|
+
*/
|
|
41
|
+
setUserAsEditor: () => void;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Resets the user access.
|
|
45
|
+
*/
|
|
46
|
+
resetUserAccess: () => void;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Constructor for LiveStateSyncElement.
|
|
50
|
+
*/
|
|
51
|
+
constructor();
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Private method for getting live state data.
|
|
55
|
+
*/
|
|
56
|
+
private _getLiveStateData;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Private method for getting live state data as an observable.
|
|
60
|
+
*/
|
|
61
|
+
private _getLiveStateData$;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Private method for setting live state data.
|
|
65
|
+
*/
|
|
66
|
+
private _setLiveStateData;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Private method to enable single editor mode.
|
|
70
|
+
*/
|
|
71
|
+
private _enableSingleEditorMode;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Private method to disable single editor mode.
|
|
75
|
+
*/
|
|
76
|
+
private _disableSingleEditorMode;
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Private method to check if the user is an editor.
|
|
80
|
+
*/
|
|
81
|
+
private _isUserEditor$;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Private method to set user as an editor.
|
|
85
|
+
*/
|
|
86
|
+
private _setUserAsEditor;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Private method to reset user access.
|
|
90
|
+
*/
|
|
91
|
+
private _resetUserAccess;
|
|
92
|
+
}
|
package/app/utils/constants.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ export declare class Constants {
|
|
|
25
25
|
static FIREBASE_PARTIAL_PATH_RECORDER: string;
|
|
26
26
|
static FIREBASE_PARTIAL_PATH_FOLLOW_ALONG: string;
|
|
27
27
|
static FIREBASE_PARTIAL_PATH_SYNC_VIDEO_PLAYER: string;
|
|
28
|
+
static FIREBASE_PARTIAL_PATH_LIVE_STATE: string;
|
|
28
29
|
static FIREBASE_PARTIAL_PATH_IAM: string;
|
|
29
30
|
static FIREBASE_PARTIAL_PATH_USERS: string;
|
|
30
31
|
static FIREBASE_PARTIAL_PATH_USER_REQUESTS: string;
|
|
@@ -233,6 +234,9 @@ export declare class Constants {
|
|
|
233
234
|
SYNC_VIDEO_PLAYER: string;
|
|
234
235
|
VELT_INLINE_COMMENT_ID: string;
|
|
235
236
|
VELT_PDF_VIEWER: string;
|
|
237
|
+
VELT_SYNC_STATE: string;
|
|
238
|
+
VELT_SYNC_ACCESS: string;
|
|
239
|
+
VELT_SYNC_DISABLED_STATE: string;
|
|
236
240
|
};
|
|
237
241
|
static INJECTION_STYLE_PROPS: {
|
|
238
242
|
/**
|
|
@@ -291,6 +295,7 @@ export declare class Constants {
|
|
|
291
295
|
static VELT_COLOR: string;
|
|
292
296
|
static VELT_MIN_ARROW_LENGTH: number;
|
|
293
297
|
static VELT_ARROW_VIEWPORT_PADDING: number;
|
|
298
|
+
static LIVE_STATE_REQUEST_EDITOR_ACCESS_WAIT_TIME: number;
|
|
294
299
|
static CURSOR: {
|
|
295
300
|
COMMENT_PIN: string;
|
|
296
301
|
TAG_PIN: string;
|