@veltdev/sdk 1.0.79 → 1.0.80
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.
|
@@ -23,9 +23,11 @@ export declare class SingleEditorLiveStateData {
|
|
|
23
23
|
requestEditorAccess?: {
|
|
24
24
|
user: User;
|
|
25
25
|
requestedAt: any;
|
|
26
|
-
status: 'pending' | 'accepted' | 'rejected';
|
|
26
|
+
status: 'pending' | 'accepted' | 'rejected' | 'cancelled';
|
|
27
27
|
editorAccessTimeout: number;
|
|
28
|
+
tabId?: string | null;
|
|
28
29
|
} | null;
|
|
30
|
+
tabId?: string | null;
|
|
29
31
|
}
|
|
30
32
|
export declare class SingleEditorConfig {
|
|
31
33
|
/**
|
|
@@ -33,4 +35,18 @@ export declare class SingleEditorConfig {
|
|
|
33
35
|
* When custom mode is enabled, the input elements will not be disabled for viewer.
|
|
34
36
|
*/
|
|
35
37
|
customMode?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* To enable/disable editor mode on single tab only.
|
|
40
|
+
*/
|
|
41
|
+
singleTabEditor: boolean;
|
|
42
|
+
}
|
|
43
|
+
export declare class UserEditor {
|
|
44
|
+
/**
|
|
45
|
+
* True if the user is editor.
|
|
46
|
+
*/
|
|
47
|
+
editor?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* True if the user is editor on current tab.
|
|
50
|
+
*/
|
|
51
|
+
editorOnCurrentTab?: boolean;
|
|
36
52
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
|
-
import { SingleEditorConfig } from '../data/live-state-data.data.model';
|
|
2
|
+
import { SingleEditorConfig, UserEditor } from '../data/live-state-data.data.model';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Represents the synchronization element for live state.
|
|
@@ -36,12 +36,17 @@ export declare class LiveStateSyncElement {
|
|
|
36
36
|
* Checks if the current user is an editor. Returns an observable.
|
|
37
37
|
* @deprecated Use `isUserEditor` instead
|
|
38
38
|
*/
|
|
39
|
-
isUserEditor$: () => Observable<
|
|
39
|
+
isUserEditor$: () => Observable<UserEditor | null>;
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
42
|
* Checks if the current user is an editor. Returns an observable.
|
|
43
43
|
*/
|
|
44
|
-
isUserEditor: () => Observable<
|
|
44
|
+
isUserEditor: () => Observable<UserEditor | null>;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* To get editor
|
|
48
|
+
*/
|
|
49
|
+
getEditor: () => Observable<User | null>;
|
|
45
50
|
|
|
46
51
|
/**
|
|
47
52
|
* Sets the current user as an editor.
|
|
@@ -76,7 +81,7 @@ export declare class LiveStateSyncElement {
|
|
|
76
81
|
/**
|
|
77
82
|
* To check if editor access is requested
|
|
78
83
|
*/
|
|
79
|
-
isEditorAccessRequested: () => Observable<
|
|
84
|
+
isEditorAccessRequested: () => Observable<{ requestStatus: string, requestedBy: User } | null>;
|
|
80
85
|
|
|
81
86
|
/**
|
|
82
87
|
* To accept editor access request
|
|
@@ -88,6 +93,11 @@ export declare class LiveStateSyncElement {
|
|
|
88
93
|
*/
|
|
89
94
|
rejectEditorAccessRequest: () => void;
|
|
90
95
|
|
|
96
|
+
/**
|
|
97
|
+
* To cancel editor access request
|
|
98
|
+
*/
|
|
99
|
+
cancelEditorAccessRequest: () => void;
|
|
100
|
+
|
|
91
101
|
/**
|
|
92
102
|
* To set editor access timeout
|
|
93
103
|
*/
|
|
@@ -155,6 +165,11 @@ export declare class LiveStateSyncElement {
|
|
|
155
165
|
*/
|
|
156
166
|
private _isUserEditor;
|
|
157
167
|
|
|
168
|
+
/**
|
|
169
|
+
* Private method to get editor.
|
|
170
|
+
*/
|
|
171
|
+
private _getEditor;
|
|
172
|
+
|
|
158
173
|
/**
|
|
159
174
|
* Private method to set user as an editor.
|
|
160
175
|
*/
|
|
@@ -201,6 +216,11 @@ export declare class LiveStateSyncElement {
|
|
|
201
216
|
*/
|
|
202
217
|
private _rejectEditorAccessRequest;
|
|
203
218
|
|
|
219
|
+
/**
|
|
220
|
+
* To cancel editor access request
|
|
221
|
+
*/
|
|
222
|
+
private _cancelEditorAccessRequest;
|
|
223
|
+
|
|
204
224
|
/**
|
|
205
225
|
* To set editor access timeout
|
|
206
226
|
*/
|