Remove chunter:class:Attachment (#597)

Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
Denis Bykhov 2021-12-09 15:07:26 +06:00 committed by GitHub
parent 83f6b3818e
commit fccf15486c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 4 additions and 21 deletions

View File

@ -34,8 +34,6 @@
"@anticrm/platform": "~0.6.5", "@anticrm/platform": "~0.6.5",
"@anticrm/model-core": "~0.6.0", "@anticrm/model-core": "~0.6.0",
"@anticrm/model-view": "~0.6.0", "@anticrm/model-view": "~0.6.0",
"@anticrm/model-attachment": "~0.6.0",
"@anticrm/attachment": "~0.6.0",
"@anticrm/model-workbench": "~0.6.1", "@anticrm/model-workbench": "~0.6.1",
"@anticrm/activity": "~0.6.0", "@anticrm/activity": "~0.6.0",
"@anticrm/workbench": "~0.6.1" "@anticrm/workbench": "~0.6.1"

View File

@ -18,11 +18,9 @@ import { Builder, Model, Prop, UX, TypeString, Index } from '@anticrm/model'
import type { Ref, Doc, Class, Domain } from '@anticrm/core' import type { Ref, Doc, Class, Domain } from '@anticrm/core'
import { IndexKind } from '@anticrm/core' import { IndexKind } from '@anticrm/core'
import core, { TSpace, TDoc, TAttachedDoc } from '@anticrm/model-core' import core, { TSpace, TDoc, TAttachedDoc } from '@anticrm/model-core'
import type { Backlink, Channel, Message, Comment, Attachment } from '@anticrm/chunter' import type { Backlink, Channel, Message, Comment } from '@anticrm/chunter'
import type { AnyComponent } from '@anticrm/ui' import type { AnyComponent } from '@anticrm/ui'
import activity from '@anticrm/activity' import activity from '@anticrm/activity'
import { TAttachment as TOriginAttachment } from '@anticrm/model-attachment'
import attachment from '@anticrm/attachment'
import workbench from '@anticrm/model-workbench' import workbench from '@anticrm/model-workbench'
@ -51,11 +49,6 @@ export class TComment extends TAttachedDoc implements Comment {
message!: string message!: string
} }
@Model(chunter.class.Attachment, attachment.class.Attachment)
@UX('File' as IntlString)
export class TAttachment extends TOriginAttachment implements Attachment {
}
@Model(chunter.class.Backlink, chunter.class.Comment) @Model(chunter.class.Backlink, chunter.class.Comment)
export class TBacklink extends TComment implements Backlink { export class TBacklink extends TComment implements Backlink {
backlinkId!: Ref<Doc> backlinkId!: Ref<Doc>
@ -63,7 +56,7 @@ export class TBacklink extends TComment implements Backlink {
} }
export function createModel (builder: Builder): void { export function createModel (builder: Builder): void {
builder.createModel(TChannel, TMessage, TComment, TBacklink, TAttachment) builder.createModel(TChannel, TMessage, TComment, TBacklink)
builder.mixin(chunter.class.Channel, core.class.Class, workbench.mixin.SpaceView, { builder.mixin(chunter.class.Channel, core.class.Class, workbench.mixin.SpaceView, {
view: { view: {
class: chunter.class.Message class: chunter.class.Message

View File

@ -57,7 +57,7 @@ export class TCandidate extends TPerson implements Candidate {
@Prop(TypeString(), 'Title' as IntlString) @Prop(TypeString(), 'Title' as IntlString)
title?: string title?: string
@Prop(Collection(chunter.class.Attachment), 'Attachments' as IntlString) @Prop(Collection(attachment.class.Attachment), 'Attachments' as IntlString)
attachments?: number attachments?: number
@Prop(Collection(chunter.class.Comment), 'Comments' as IntlString) @Prop(Collection(chunter.class.Comment), 'Comments' as IntlString)

View File

@ -26,7 +26,6 @@
"typescript": "^4.3.5" "typescript": "^4.3.5"
}, },
"dependencies": { "dependencies": {
"@anticrm/attachment": "~0.6.0",
"@anticrm/platform": "~0.6.5", "@anticrm/platform": "~0.6.5",
"@anticrm/core": "~0.6.11" "@anticrm/core": "~0.6.11"
} }

View File

@ -16,7 +16,6 @@
import { IntlString, plugin } from '@anticrm/platform' import { IntlString, plugin } from '@anticrm/platform'
import type { Asset, Plugin } from '@anticrm/platform' import type { Asset, Plugin } from '@anticrm/platform'
import type { Space, Doc, Ref, Class, AttachedDoc } from '@anticrm/core' import type { Space, Doc, Ref, Class, AttachedDoc } from '@anticrm/core'
import type { Attachment as OriginAttachment } from '@anticrm/attachment'
/** /**
* @public * @public
@ -45,11 +44,6 @@ export interface Backlink extends Comment {
backlinkClass: Ref<Class<Doc>> backlinkClass: Ref<Class<Doc>>
} }
/**
* @public
*/
export interface Attachment extends OriginAttachment {}
/** /**
* @public * @public
*/ */
@ -64,8 +58,7 @@ export default plugin(chunterId, {
class: { class: {
Message: '' as Ref<Class<Message>>, Message: '' as Ref<Class<Message>>,
Backlink: '' as Ref<Class<Backlink>>, Backlink: '' as Ref<Class<Backlink>>,
Comment: '' as Ref<Class<Comment>>, Comment: '' as Ref<Class<Comment>>
Attachment: '' as Ref<Class<Attachment>>
}, },
space: { space: {
Backlinks: '' as Ref<Space> Backlinks: '' as Ref<Space>