-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
Copy pathplugin.ts
81 lines (77 loc) · 3.09 KB
/
plugin.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
//
// Copyright © 2023 Hardcore Engineering Inc.
//
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. You may
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//
// See the License for the specific language governing permissions and
// limitations under the License.
//
import { documentsId } from '@hcengineering/controlled-documents'
import documents from '@hcengineering/controlled-documents-resources/src/plugin'
import type { Client, Doc, Ref } from '@hcengineering/core'
import { type ObjectSearchCategory, type ObjectSearchFactory } from '@hcengineering/model-presentation'
import { mergeIds, type Resource } from '@hcengineering/platform'
import { type TagCategory } from '@hcengineering/tags'
import { type AnyComponent } from '@hcengineering/ui'
import { type ActionCategory, type ViewAction } from '@hcengineering/view'
import { type NotificationType, type NotificationGroup } from '@hcengineering/notification'
import { type TextActionVisibleFunction, type TextActionFunction } from '@hcengineering/text-editor'
export default mergeIds(documentsId, documents, {
component: {
DocumentVersions: '' as AnyComponent,
EditDocumentContent: '' as AnyComponent,
EditDocumentAttachment: '' as AnyComponent,
// new model components
CategoryPresenter: '' as AnyComponent,
Categories: '' as AnyComponent,
DocumentTemplates: '' as AnyComponent,
StateFilterValuePresenter: '' as AnyComponent,
ControlledStateFilterValuePresenter: '' as AnyComponent,
// Projects
Projects: '' as AnyComponent
},
completion: {
DocumentMetaQuery: '' as Resource<ObjectSearchFactory>,
DocumentMetaCategory: '' as Ref<ObjectSearchCategory>
},
category: {
Document: '' as Ref<ActionCategory>,
Other: '' as Ref<TagCategory>,
OtherTemplate: '' as Ref<TagCategory>
},
function: {
DocumentIdentifierProvider: '' as Resource<
<T extends Doc>(client: Client, ref: Ref<T>, doc?: T) => Promise<string>
>,
Comment: '' as Resource<TextActionFunction>,
IsCommentVisible: '' as Resource<TextActionVisibleFunction>
},
actionImpl: {
CreateChildDocument: '' as ViewAction,
CreateChildTemplate: '' as ViewAction,
CreateDocument: '' as ViewAction,
CreateTemplate: '' as ViewAction,
TransferTemplate: '' as ViewAction,
DeleteDocument: '' as ViewAction,
ArchiveDocument: '' as ViewAction,
TransferDocument: '' as ViewAction,
EditDocSpace: '' as ViewAction
},
viewlet: {
TableDocument: '' as Ref<Doc>,
ListDocument: '' as Ref<Doc>,
TableDocumentTemplate: '' as Ref<Doc>,
TableDocumentDomain: '' as Ref<Doc>
},
notification: {
DocumentsNotificationGroup: '' as Ref<NotificationGroup>,
ContentNotification: '' as Ref<NotificationType>,
StateNotification: '' as Ref<NotificationType>
}
})