dochub-sdk 0.1.8 → 0.1.10

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.
@@ -1,9 +1,9 @@
1
1
  import { IDocHubContentProvider } from './content';
2
2
  import { IDocHubProtocol } from './protocol';
3
3
  import { IDocHubDocument } from './document';
4
+ import { IDocHubEditor } from './editor';
4
5
  import { IDocHubUIComponent } from './uicomponent';
5
6
 
6
-
7
7
  export interface IDocHubEnv {
8
8
  [id: string]: string
9
9
  }
@@ -65,6 +65,13 @@ export interface IDocHubDocuments {
65
65
  fetch(): string[];
66
66
  }
67
67
 
68
+ export interface IDocHubEditors {
69
+ // Регистрирует редактор на тип документа
70
+ register(type: string, document: IDocHubEditor);
71
+ // Возвращает массив зарегистрированных редакторов
72
+ fetch(): string[];
73
+ }
74
+
68
75
  export interface IDocHubUI {
69
76
  // Регистрирует UI компонент в слоте
70
77
  register(slot: string, component: IDocHubUIComponent);
@@ -88,11 +95,12 @@ export interface IDocHubDataLake {
88
95
  // Главный интерфейс
89
96
  export interface IDocHubCore {
90
97
  problems: IDocHubProblems; // Проблемы
91
- settings: IDocHubSettings; // Пользовтельские настройки
98
+ settings: IDocHubSettings; // Пользовательские настройки
92
99
  router: IDocHubRouter; // Работа с UI роутами
93
100
  contentProviders: IDocHubContentProviders; // Провайдеры контента
94
101
  protocols: IDocHubProtocols; // Протоколы доступа к данным
95
102
  documents: IDocHubDocuments; // Документы
103
+ editors: IDocHubEditors; // Редакторы
96
104
  ui: IDocHubUI; // UI порт
97
105
  dataLake: IDocHubDataLake; // Интерфейс к архкоду
98
106
  }
@@ -1,7 +1,3 @@
1
- export enum DocumentEvents {
2
- onEditOpen = 'on-document-editor-open'
3
- }
4
-
5
1
  export interface IDocHubDocument {
6
2
 
7
3
  }
@@ -1,21 +1,7 @@
1
- import { DocumentEvents } from "./document";
2
-
3
- export enum EditorEvents {
4
- onEditClose = 'on-editor-close',
5
- onEditSave = 'on-editor-save',
6
- onEditCreate = 'on-editor-create',
7
- onEditDelete = 'on-editor-delete'
8
- }
9
-
10
1
  export interface IDocHubEditor {
2
+ title: string; // Заголовок для закладки в редакторе
11
3
  close(): Promise<boolean>; // Требует закрыть редактор
12
4
  save(): Promise<boolean>; // Требует произвести сохранение
13
5
  create(): Promise<boolean>; // Требует создать новый документ
14
6
  delete(): Promise<boolean>; // Требует удалить документ
15
7
  }
16
-
17
- export interface IDocHubEditAPI {
18
- mountEditor(editor: IDocHubEditor, propsData: any);
19
- unmountEditor(editor: IDocHubEditor);
20
- }
21
-
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dochub-sdk",
3
- "version": "0.1.8",
3
+ "version": "0.1.10",
4
4
  "description": "The DocHub System Development Kit.",
5
5
  "private": false,
6
6
  "main": "index.ts",