dochub-sdk 0.1.22 → 0.1.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/index.ts CHANGED
@@ -8,6 +8,7 @@ export * from './interfaces/protocol';
8
8
  export * from './interfaces/uicomponent';
9
9
  export * from './interfaces/editor';
10
10
  export * from './interfaces/datalake';
11
+ export * from './interfaces/constructors';
11
12
 
12
13
  export const DocHub: IDocHubCore = window['DocHub'];
13
14
  export const Vue2: any = window['Vue'];
@@ -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
+
@@ -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; // Внутренняя шина событий
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dochub-sdk",
3
- "version": "0.1.22",
3
+ "version": "0.1.24",
4
4
  "description": "The DocHub System Development Kit.",
5
5
  "private": false,
6
6
  "main": "index.ts",