Basic mentions support (#832)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev
2022-01-19 10:04:30 +01:00
committed by GitHub
parent b56f3bba7c
commit 0d8daf2fea
96 changed files with 1006 additions and 1604 deletions
+15 -2
View File
@@ -14,7 +14,7 @@
// limitations under the License.
//
import type { Class, Client, Doc, DocumentQuery, FindOptions, Mixin, Obj, Ref, Space, UXObject } from '@anticrm/core'
import type { Class, Client, Doc, DocumentQuery, FindOptions, Mixin, Obj, Ref, Space, TxOperations, UXObject } from '@anticrm/core'
import type { Asset, IntlString, Plugin, Resource, Status } from '@anticrm/platform'
import { plugin } from '@anticrm/platform'
import type { AnyComponent, AnySvelteComponent } from '@anticrm/ui'
@@ -139,6 +139,15 @@ export interface ObjectFactory extends Class<Obj> {
component: AnyComponent
}
/**
* Allow to contribute and find all derived objects for document.
* @public
*/
export interface ObjectDDParticipant extends Class<Obj> {
// Collect more items to be deleted if parent document is deleted.
collectDocs: Resource<(doc: Doc, client: TxOperations) => Promise<Doc[]>>
}
/**
* @public
*/
@@ -149,7 +158,8 @@ const view = plugin(viewId, {
ObjectEditor: '' as Ref<Mixin<ObjectEditor>>,
ObjectEditorHeader: '' as Ref<Mixin<ObjectEditorHeader>>,
ObjectValidator: '' as Ref<Mixin<ObjectValidator>>,
ObjectFactory: '' as Ref<Mixin<ObjectFactory>>
ObjectFactory: '' as Ref<Mixin<ObjectFactory>>,
ObjectDDParticipant: '' as Ref<ObjectDDParticipant>
},
class: {
ViewletDescriptor: '' as Ref<Class<ViewletDescriptor>>,
@@ -160,6 +170,9 @@ const view = plugin(viewId, {
viewlet: {
Table: '' as Ref<ViewletDescriptor>
},
component: {
ObjectPresenter: '' as AnyComponent
},
icon: {
Table: '' as Asset,
Delete: '' as Asset,