dochub-sdk 0.1.21 → 0.1.23
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/interfaces/constructors.ts +21 -0
- package/interfaces/core.ts +3 -0
- package/package.json +1 -1
@@ -0,0 +1,21 @@
|
|
1
|
+
// Компонент конструктора
|
2
|
+
export interface IDocHubConstructorComponent {
|
3
|
+
}
|
4
|
+
|
5
|
+
// Запись в коллекции о конструкторе
|
6
|
+
export interface IDocHubConstructorItem {
|
7
|
+
component: IDocHubConstructorComponent;
|
8
|
+
uid: string;
|
9
|
+
title: string;
|
10
|
+
}
|
11
|
+
|
12
|
+
// Интерфейс конструкторов
|
13
|
+
export interface IDocHubConstructors {
|
14
|
+
// Регистрирует конструктор
|
15
|
+
register(uid: string, title: string, component: IDocHubConstructorComponent);
|
16
|
+
// Возвращает список конструкторов
|
17
|
+
fetch():IDocHubConstructorItem[];
|
18
|
+
// Возвращает запись коллекции по идентификатору
|
19
|
+
get(uid: string): IDocHubConstructorItem;
|
20
|
+
}
|
21
|
+
|
package/interfaces/core.ts
CHANGED
@@ -4,6 +4,7 @@ import { IDocHubDocument } from './document';
|
|
4
4
|
import { IDocHubEditor, EditorEvents } from './editor';
|
5
5
|
import { IDocHubUIComponent } from './uicomponent';
|
6
6
|
import { IDocHubDataLake } from './datalake';
|
7
|
+
import { IDocHubConstructors } from './constructors';
|
7
8
|
|
8
9
|
export interface IDocHubEnv {
|
9
10
|
[id: string]: string
|
@@ -72,6 +73,7 @@ export interface IEditorParams {
|
|
72
73
|
[key: string]: string;
|
73
74
|
}
|
74
75
|
|
76
|
+
// Редакторы документов
|
75
77
|
export interface IDocHubEditors {
|
76
78
|
// Регистрирует редактор для типа документа
|
77
79
|
register(type: string, editor: IDocHubEditor, title?: string);
|
@@ -105,6 +107,7 @@ export interface IDocHubCore {
|
|
105
107
|
protocols: IDocHubProtocols; // Протоколы доступа к данным
|
106
108
|
documents: IDocHubDocuments; // Документы
|
107
109
|
editors: IDocHubEditors; // Редакторы
|
110
|
+
constructors: IDocHubConstructors; // Конструкторы
|
108
111
|
ui: IDocHubUI; // UI порт
|
109
112
|
dataLake: IDocHubDataLake; // Интерфейс к архкоду
|
110
113
|
eventBus: IDocHubEventBus; // Внутренняя шина событий
|