@veltdev/sdk 1.0.79 → 1.0.81
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,16 @@ export declare class LiveStateSyncElement {
|
|
|
88
93
|
*/
|
|
89
94
|
rejectEditorAccessRequest: () => void;
|
|
90
95
|
|
|
96
|
+
/**
|
|
97
|
+
* To cancel editor access request
|
|
98
|
+
*/
|
|
99
|
+
cancelEditorAccessRequest: () => void;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* To edit current tab
|
|
103
|
+
*/
|
|
104
|
+
editCurrentTab: () => void;
|
|
105
|
+
|
|
91
106
|
/**
|
|
92
107
|
* To set editor access timeout
|
|
93
108
|
*/
|
|
@@ -155,6 +170,11 @@ export declare class LiveStateSyncElement {
|
|
|
155
170
|
*/
|
|
156
171
|
private _isUserEditor;
|
|
157
172
|
|
|
173
|
+
/**
|
|
174
|
+
* Private method to get editor.
|
|
175
|
+
*/
|
|
176
|
+
private _getEditor;
|
|
177
|
+
|
|
158
178
|
/**
|
|
159
179
|
* Private method to set user as an editor.
|
|
160
180
|
*/
|
|
@@ -201,6 +221,16 @@ export declare class LiveStateSyncElement {
|
|
|
201
221
|
*/
|
|
202
222
|
private _rejectEditorAccessRequest;
|
|
203
223
|
|
|
224
|
+
/**
|
|
225
|
+
* To cancel editor access request
|
|
226
|
+
*/
|
|
227
|
+
private _cancelEditorAccessRequest;
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* To edit current tab
|
|
231
|
+
*/
|
|
232
|
+
private _editCurrentTab;
|
|
233
|
+
|
|
204
234
|
/**
|
|
205
235
|
* To set editor access timeout
|
|
206
236
|
*/
|