From fccf15486c6e146369c841c5551a6dc6a4fe9e2e Mon Sep 17 00:00:00 2001 From: Denis Bykhov <80476319+BykhovDenis@users.noreply.github.com> Date: Thu, 9 Dec 2021 15:07:26 +0600 Subject: [PATCH] Remove chunter:class:Attachment (#597) Signed-off-by: Denis Bykhov --- models/chunter/package.json | 2 -- models/chunter/src/index.ts | 11 ++--------- models/recruit/src/index.ts | 2 +- plugins/chunter/package.json | 1 - plugins/chunter/src/index.ts | 9 +-------- 5 files changed, 4 insertions(+), 21 deletions(-) diff --git a/models/chunter/package.json b/models/chunter/package.json index 1a78fb1c73..95350ee8e1 100644 --- a/models/chunter/package.json +++ b/models/chunter/package.json @@ -34,8 +34,6 @@ "@anticrm/platform": "~0.6.5", "@anticrm/model-core": "~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/activity": "~0.6.0", "@anticrm/workbench": "~0.6.1" diff --git a/models/chunter/src/index.ts b/models/chunter/src/index.ts index 2c9975994f..5ebb86bd29 100644 --- a/models/chunter/src/index.ts +++ b/models/chunter/src/index.ts @@ -18,11 +18,9 @@ import { Builder, Model, Prop, UX, TypeString, Index } from '@anticrm/model' import type { Ref, Doc, Class, Domain } from '@anticrm/core' import { IndexKind } from '@anticrm/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 activity from '@anticrm/activity' -import { TAttachment as TOriginAttachment } from '@anticrm/model-attachment' -import attachment from '@anticrm/attachment' import workbench from '@anticrm/model-workbench' @@ -51,11 +49,6 @@ export class TComment extends TAttachedDoc implements Comment { 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) export class TBacklink extends TComment implements Backlink { backlinkId!: Ref @@ -63,7 +56,7 @@ export class TBacklink extends TComment implements Backlink { } 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, { view: { class: chunter.class.Message diff --git a/models/recruit/src/index.ts b/models/recruit/src/index.ts index ffa0f60d6a..c16f8780e9 100644 --- a/models/recruit/src/index.ts +++ b/models/recruit/src/index.ts @@ -57,7 +57,7 @@ export class TCandidate extends TPerson implements Candidate { @Prop(TypeString(), 'Title' as IntlString) title?: string - @Prop(Collection(chunter.class.Attachment), 'Attachments' as IntlString) + @Prop(Collection(attachment.class.Attachment), 'Attachments' as IntlString) attachments?: number @Prop(Collection(chunter.class.Comment), 'Comments' as IntlString) diff --git a/plugins/chunter/package.json b/plugins/chunter/package.json index 1386eade50..1aa9175182 100644 --- a/plugins/chunter/package.json +++ b/plugins/chunter/package.json @@ -26,7 +26,6 @@ "typescript": "^4.3.5" }, "dependencies": { - "@anticrm/attachment": "~0.6.0", "@anticrm/platform": "~0.6.5", "@anticrm/core": "~0.6.11" } diff --git a/plugins/chunter/src/index.ts b/plugins/chunter/src/index.ts index e78f72e6c4..495e658603 100644 --- a/plugins/chunter/src/index.ts +++ b/plugins/chunter/src/index.ts @@ -16,7 +16,6 @@ import { IntlString, plugin } from '@anticrm/platform' import type { Asset, Plugin } from '@anticrm/platform' import type { Space, Doc, Ref, Class, AttachedDoc } from '@anticrm/core' -import type { Attachment as OriginAttachment } from '@anticrm/attachment' /** * @public @@ -45,11 +44,6 @@ export interface Backlink extends Comment { backlinkClass: Ref> } -/** - * @public - */ -export interface Attachment extends OriginAttachment {} - /** * @public */ @@ -64,8 +58,7 @@ export default plugin(chunterId, { class: { Message: '' as Ref>, Backlink: '' as Ref>, - Comment: '' as Ref>, - Attachment: '' as Ref> + Comment: '' as Ref> }, space: { Backlinks: '' as Ref