dochub-sdk 0.1.91 → 0.1.93
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.
@@ -9,7 +9,7 @@ export interface IDocHubConstructorComponent {
|
|
9
9
|
/**
|
10
10
|
* Функция проверки корректности контекста для работы конструктора
|
11
11
|
*/
|
12
|
-
export type FContextValidator = (context: DocHubEditorContext) => Promise<boolean>;
|
12
|
+
export type FContextValidator = (context: DocHubEditorContext | null) => Promise<boolean>;
|
13
13
|
|
14
14
|
// Дополнительная информация и опциональные методы конструктора
|
15
15
|
export interface IDocHubConstructorOptions {
|
@@ -28,6 +28,8 @@ export interface IDocHubConstructorItem {
|
|
28
28
|
options?: IDocHubConstructorOptions;
|
29
29
|
}
|
30
30
|
|
31
|
+
export type DocHubUID = string;
|
32
|
+
|
31
33
|
/**
|
32
34
|
* Интерфейс конструкторов
|
33
35
|
*/
|
@@ -57,5 +59,9 @@ export interface IDocHubConstructors {
|
|
57
59
|
* @param context - Контекст который должен учесть конструктор, если он не определен, контекст будет создан автоматически
|
58
60
|
*/
|
59
61
|
showStore(pattern?: RegExp, context?: DocHubEditorContext);
|
62
|
+
/**
|
63
|
+
* Создает глобальный уникальный идентификатор
|
64
|
+
*/
|
65
|
+
makeUID(): DocHubUID;
|
60
66
|
}
|
61
67
|
|
package/interfaces/editors.ts
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
import { IDocHubFileEditorContext } from './datalake';
|
2
2
|
import { IDocHubObjectEditorContext } from './objects';
|
3
|
+
import { DocHubUID } from './constructors';
|
3
4
|
|
4
5
|
/**
|
5
6
|
* Режим функционирования
|
@@ -42,7 +43,7 @@ export enum DocHubEditorType {
|
|
42
43
|
object = 'object'
|
43
44
|
}
|
44
45
|
|
45
|
-
export type DocHubContextUID =
|
46
|
+
export type DocHubContextUID = DocHubUID;
|
46
47
|
|
47
48
|
/**
|
48
49
|
* Контекст редактора
|
@@ -79,4 +80,9 @@ export interface IDocHubEditors {
|
|
79
80
|
* @returns - Текущий контекст редактирования или null
|
80
81
|
*/
|
81
82
|
getCurrentContext(): Promise<DocHubEditorContext | null>;
|
83
|
+
/**
|
84
|
+
* Возвращает контекст по UID
|
85
|
+
* @param uid - Идентификатор контекста
|
86
|
+
*/
|
87
|
+
getContextByUID(uid: DocHubContextUID): Promise<DocHubEditorContext | null>;
|
82
88
|
}
|