dochub-sdk 0.1.219 → 0.1.221
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.
@@ -3,7 +3,7 @@ import { Prop, Watch, Component } from 'vue-property-decorator';
|
|
3
3
|
import { DocHubComponentProto } from './Components';
|
4
4
|
import { DocHub } from '../..';
|
5
5
|
import { DocHubError } from '..';
|
6
|
-
import type { IDocHubEditableComponent, IDocHubPresentationProfile, IDocHubPresentationsParams } from '../..';
|
6
|
+
import type { IDocHubEditableComponent, IDocHubEditableMeta, IDocHubPresentationProfile, IDocHubPresentationsParams } from '../..';
|
7
7
|
|
8
8
|
import ajv from 'ajv';
|
9
9
|
import ajv_localize from 'ajv-i18n/localize/ru';
|
@@ -98,6 +98,14 @@ export class DocHubDocumentProto extends DocHubComponentProto implements IDocHub
|
|
98
98
|
targetPath: this.profile.$base
|
99
99
|
});
|
100
100
|
}
|
101
|
+
/**
|
102
|
+
* Возвращает метаинформацию для режима редактирования
|
103
|
+
*/
|
104
|
+
async getMetaEdit(): Promise<IDocHubEditableMeta> {
|
105
|
+
return {
|
106
|
+
title: (this.followFiles || [])[0]
|
107
|
+
}
|
108
|
+
}
|
101
109
|
/**
|
102
110
|
* Обработка полученных данных документа.
|
103
111
|
* Можно перехватывать.
|
package/interfaces/editors.ts
CHANGED
@@ -15,6 +15,7 @@ export enum DocHubEditMode {
|
|
15
15
|
*/
|
16
16
|
export interface IDocHubEditableMeta {
|
17
17
|
title: string; // Название объекта редактирования. Выводится пользователя, например, в выпадающем меню
|
18
|
+
icon?: string; // Иконка соответствующая объекту редактирования
|
18
19
|
}
|
19
20
|
/**
|
20
21
|
* Если компонент имеет возможность контекстного редактирования, он должен реализовывать данный интерфейс
|