import { type Class, type Doc, type Mixin, type Ref, type Type, type Space, type SpaceTypeDescriptor, type Permission } from '@hcengineering/core' import type { Asset, Plugin, Resource } from '@hcengineering/platform' import { IntlString, plugin } from '@hcengineering/platform' import type { AnyComponent, ResolvedLocation, Location } from '@hcengineering/ui' import { Action } from '@hcengineering/view' import type { AttachmentsDocumentSection, ChangeControl, CollaborativeDocumentSection, ControlledDocument, ControlledDocumentState, Document, DocumentSnapshot, DocumentApprovalRequest, DocumentCategory, DocumentComment, DocumentMeta, DocumentRequest, DocumentReviewRequest, DocumentSection, DocumentSectionCreator, DocumentSectionEditor, DocumentSectionPresenter, DocumentSpace, DocumentSpaceType, DocumentSpaceTypeDescriptor, DocumentState, DocumentTemplate, DocumentTemplateSection, DocumentTraining, HierarchyDocument, ExternalSpace, OrgSpace, Project, ProjectMeta, ProjectDocument, Sequence, ControlledDocumentSnapshot } from './types' /** * @public */ export const documentsId = 'documents' as Plugin /** * @public */ export const documentsPlugin = plugin(documentsId, { class: { DocumentSpace: '' as Ref>, DocumentSpaceType: '' as Ref>, DocumentSpaceTypeDescriptor: '' as Ref>, ExternalSpace: '' as Ref>, OrgSpace: '' as Ref>, Project: '' as Ref>, ProjectMeta: '' as Ref>, ProjectDocument: '' as Ref>, DocumentMeta: '' as Ref>, Document: '' as Ref>, DocumentSnapshot: '' as Ref>, ControlledDocumentSnapshot: '' as Ref>, HierarchyDocument: '' as Ref>, DocumentCategory: '' as Ref>, ControlledDocument: '' as Ref>, ChangeControl: '' as Ref>, DocumentSection: '' as Ref>, DocumentComment: '' as Ref>, CollaborativeDocumentSection: '' as Ref>, AttachmentsDocumentSection: '' as Ref>, Sequence: '' as Ref>, DocumentRequest: '' as Ref>, DocumentReviewRequest: '' as Ref>, DocumentApprovalRequest: '' as Ref>, TypeDocumentState: '' as Ref>>, TypeControlledDocumentState: '' as Ref>> }, mixin: { DocumentTemplate: '' as Ref>, DocumentTraining: '' as Ref>, DocumentSectionEditor: '' as Ref>, DocumentSectionPresenter: '' as Ref>, DocumentSectionCreator: '' as Ref>, DocumentTemplateSection: '' as Ref>, DocumentSpaceTypeData: '' as Ref> // DocTemplateActions: '' as Ref> }, component: { Documents: '' as AnyComponent, DocumentsContainer: '' as AnyComponent, CreateDocument: '' as AnyComponent, EditDocOwner: '' as AnyComponent, QmsDocumentWizard: '' as AnyComponent, QmsTemplateWizard: '' as AnyComponent, EditDoc: '' as AnyComponent, EditProjectDoc: '' as AnyComponent, EditDocTemplate: '' as AnyComponent, DocumentPresenter: '' as AnyComponent, StatePresenter: '' as AnyComponent, TitlePresenter: '' as AnyComponent, ModificationDatePresenter: '' as AnyComponent, OwnerPresenter: '' as AnyComponent, AddCommentPopup: '' as AnyComponent, DocumentCommentsPopup: '' as AnyComponent, ChangeOwnerPopup: '' as AnyComponent, DocumentMetaPresenter: '' as AnyComponent, DocumentVersionPresenter: '' as AnyComponent, DeleteCategoryPopup: '' as AnyComponent, DocumentIcon: '' as AnyComponent }, action: { ChangeDocumentOwner: '' as Ref>, DeleteDocumentTemplateSection: '' as Ref, CreateChildDocument: '' as Ref>, CreateChildTemplate: '' as Ref>, CreateDocument: '' as Ref>, CreateTemplate: '' as Ref>, DeleteDocumentCategory: '' as Ref>, DeleteDocument: '' as Ref, EditDocSpace: '' as Ref, Print: '' as Ref> }, function: { CanChangeDocumentOwner: '' as Resource<(doc?: Doc | Doc[]) => Promise>, CanDeleteDocumentCategory: '' as Resource<(doc?: Doc | Doc[]) => Promise> }, icon: { Approvals: '' as Asset, CheckmarkCircle: '' as Asset, DocumentApplication: '' as Asset, NewDocument: '' as Asset, Document: '' as Asset, Library: '' as Asset, StateDraft: '' as Asset, StateApproved: '' as Asset, StateEffective: '' as Asset, StateRejected: '' as Asset, StateObsolete: '' as Asset, ArrowUp: '' as Asset, ArrowDown: '' as Asset, Duplicate: '' as Asset, EditDescription: '' as Asset, EditGuidance: '' as Asset, Configure: '' as Asset }, space: { Documents: '' as Ref, QualityDocuments: '' as Ref, UnsortedTemplates: '' as Ref }, spaceType: { DocumentSpaceType: '' as Ref }, app: { Documents: '' as Ref }, string: { Document: '' as IntlString, Documents: '' as IntlString, DocumentTemplate: '' as IntlString, Title: '' as IntlString, Code: '' as IntlString, Number: '' as IntlString, Version: '' as IntlString, Category: '' as IntlString, Author: '' as IntlString, Owner: '' as IntlString, Status: '' as IntlString, Labels: '' as IntlString, Sections: '' as IntlString, Description: '' as IntlString, Reason: '' as IntlString, CollaborativeDocument: '' as IntlString, ControlledDocument: '' as IntlString, Review: '' as IntlString, Approval: '' as IntlString, Reviewers: '' as IntlString, Approvers: '' as IntlString, CoAuthors: '' as IntlString, ReviewInterval: '' as IntlString, EffectiveDate: '' as IntlString, PlannedEffectiveDate: '' as IntlString, ChangeControl: '' as IntlString, Section: '' as IntlString, Rank: '' as IntlString, CollaborativeSection: '' as IntlString, CollaboratorSectionId: '' as IntlString, AttachmentsSection: '' as IntlString, DocumentRequest: '' as IntlString, DocumentReviewRequest: '' as IntlString, DocumentApprovalRequest: '' as IntlString, ControlledStatus: '' as IntlString, Categories: '' as IntlString, Guidance: '' as IntlString, Required: '' as IntlString, SectionTemplate: '' as IntlString, Major: '' as IntlString, Minor: '' as IntlString, Patch: '' as IntlString, AttachmentsMax: '' as IntlString, Draft: '' as IntlString, Deleted: '' as IntlString, Effective: '' as IntlString, Archived: '' as IntlString, Parent: '' as IntlString, Template: '' as IntlString, GeneralInfo: '' as IntlString, InProgress: '' as IntlString, Resolve: '' as IntlString, Unresolve: '' as IntlString, Resolved: '' as IntlString, ShowResolved: '' as IntlString, Ordering: '' as IntlString, SelectOwner: '' as IntlString, ChangeOwner: '' as IntlString, ChangeOwnerHintBeginning: '' as IntlString, ChangeOwnerHintEnd: '' as IntlString, ChangeOwnerWarning: '' as IntlString, CreateDocument: '' as IntlString, CreateTemplate: '' as IntlString, DeleteCategory: '' as IntlString, DeleteCategoryHint: '' as IntlString, DeleteCategoryWarning: '' as IntlString, Key: '' as IntlString, SectionKey: '' as IntlString, CommentsSequence: '' as IntlString, Index: '' as IntlString, GeneralDocumentation: '' as IntlString, TechnicalDocumentation: '' as IntlString, UnsortedTemplates: '' as IntlString, Project: '' as IntlString, Projects: '' as IntlString, ExternalSpace: '' as IntlString, DocumentSpaceType: '' as IntlString, Path: '' as IntlString, CreateChildDocument: '' as IntlString, CreateChildTemplate: '' as IntlString, All: '' as IntlString, ImpactAnalysis: '' as IntlString, ImpactedDocuments: '' as IntlString, SysTemplate: '' as IntlString, DocumentTrainingDueDays: '' as IntlString, DocumentTrainingEnabled: '' as IntlString, Own: '' as IntlString, Snapshot: '' as IntlString, Snapshots: '' as IntlString, ControlledSnapshot: '' as IntlString, DraftRevision: '' as IntlString, CreateNewDraft: '' as IntlString, CreateOrgSpace: '' as IntlString, ReviewDocumentPermission: '' as IntlString, ReviewDocumentDescription: '' as IntlString, ApproveDocumentPermission: '' as IntlString, ApproveDocumentDescription: '' as IntlString, CoAuthorDocumentPermission: '' as IntlString, CoAuthorDocumentDescription: '' as IntlString, CreateDocumentPermission: '' as IntlString, CreateDocumentDescription: '' as IntlString, UpdateDocumentOwnerPermission: '' as IntlString, UpdateDocumentOwnerDescription: '' as IntlString, CreateDocumentCategoryPermission: '' as IntlString, CreateDocumentCategoryDescription: '' as IntlString, UpdateDocumentCategoryPermission: '' as IntlString, UpdateDocumentCategoryDescription: '' as IntlString, DeleteDocumentCategoryPermission: '' as IntlString, DeleteDocumentCategoryDescription: '' as IntlString, ConfigLabel: '' as IntlString, ConfigDescription: '' as IntlString }, ids: { NoParent: '' as Ref, NoProject: '' as Ref }, sequence: { Templates: '' as Ref, CcTemplates: '' as Ref, EccTemplates: '' as Ref }, category: { DOC: '' as Ref, VE: '' as Ref, CM: '' as Ref, CA: '' as Ref, CC: '' as Ref }, resolver: { Location: '' as Resource<(loc: Location) => Promise> }, descriptor: { DocumentSpaceType: '' as Ref }, permission: { ReviewDocument: '' as Ref, ApproveDocument: '' as Ref, CoAuthorDocument: '' as Ref, CreateDocument: '' as Ref, UpdateDocumentOwner: '' as Ref, CreateDocumentCategory: '' as Ref, UpdateDocumentCategory: '' as Ref, DeleteDocumentCategory: '' as Ref }, template: { ProductChangeControl: '' as Ref } }) export default documentsPlugin