2021-08-07 18:23:13 +03:00
|
|
|
//
|
|
|
|
// Copyright © 2020 Anticrm Platform Contributors.
|
|
|
|
//
|
|
|
|
// 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.
|
|
|
|
//
|
|
|
|
|
2024-03-07 09:53:07 +03:00
|
|
|
import type { ActivityMessage, TxViewlet } from '@hcengineering/activity'
|
2023-11-20 13:01:43 +03:00
|
|
|
import { chunterId, type Channel } from '@hcengineering/chunter'
|
2022-09-21 11:08:25 +03:00
|
|
|
import chunter from '@hcengineering/chunter-resources/src/plugin'
|
2024-01-11 17:46:11 +03:00
|
|
|
import { type Client, type Doc, type Ref } from '@hcengineering/core'
|
2024-01-18 08:44:05 +03:00
|
|
|
import { type NotificationGroup } from '@hcengineering/notification'
|
2022-09-21 11:08:25 +03:00
|
|
|
import type { IntlString, Resource } from '@hcengineering/platform'
|
|
|
|
import { mergeIds } from '@hcengineering/platform'
|
2023-11-20 18:22:42 +03:00
|
|
|
import type { AnyComponent, Location } from '@hcengineering/ui/src/types'
|
2022-09-21 11:08:25 +03:00
|
|
|
import type { Action, ActionCategory, ViewAction, ViewletDescriptor } from '@hcengineering/view'
|
2021-08-07 18:23:13 +03:00
|
|
|
|
|
|
|
export default mergeIds(chunterId, chunter, {
|
2021-08-31 17:54:47 +03:00
|
|
|
component: {
|
2022-04-02 07:08:37 +03:00
|
|
|
ChannelPresenter: '' as AnyComponent,
|
2023-04-05 10:12:06 +03:00
|
|
|
DirectMessagePresenter: '' as AnyComponent,
|
2023-03-01 12:23:42 +03:00
|
|
|
MessagePresenter: '' as AnyComponent,
|
2022-04-22 06:13:15 +03:00
|
|
|
DmPresenter: '' as AnyComponent,
|
2024-01-11 17:46:11 +03:00
|
|
|
ChannelsPanel: '' as AnyComponent,
|
2024-01-18 08:44:05 +03:00
|
|
|
Chat: '' as AnyComponent,
|
|
|
|
ChatMessageNotificationLabel: '' as AnyComponent,
|
|
|
|
ThreadNotificationPresenter: '' as AnyComponent
|
2021-08-31 17:54:47 +03:00
|
|
|
},
|
2022-04-05 11:01:03 +03:00
|
|
|
action: {
|
|
|
|
MarkCommentUnread: '' as Ref<Action>,
|
2022-04-18 08:56:25 +03:00
|
|
|
MarkUnread: '' as Ref<Action>,
|
|
|
|
ArchiveChannel: '' as Ref<Action>,
|
2022-05-17 10:11:09 +03:00
|
|
|
UnarchiveChannel: '' as Ref<Action>,
|
2023-03-15 17:06:03 +03:00
|
|
|
ConvertToPrivate: '' as Ref<Action>,
|
2024-01-18 08:44:05 +03:00
|
|
|
CopyChatMessageLink: '' as Ref<Action<Doc, any>>
|
2022-04-05 11:01:03 +03:00
|
|
|
},
|
|
|
|
actionImpl: {
|
2022-04-19 12:38:31 +03:00
|
|
|
ArchiveChannel: '' as ViewAction,
|
2022-05-17 10:11:09 +03:00
|
|
|
UnarchiveChannel: '' as ViewAction,
|
2023-12-13 18:59:11 +03:00
|
|
|
ConvertDmToPrivateChannel: '' as ViewAction,
|
2024-02-12 11:57:28 +03:00
|
|
|
DeleteChatMessage: '' as ViewAction
|
2022-04-05 11:01:03 +03:00
|
|
|
},
|
2022-05-04 11:08:12 +03:00
|
|
|
category: {
|
|
|
|
Chunter: '' as Ref<ActionCategory>
|
|
|
|
},
|
2021-08-07 18:23:13 +03:00
|
|
|
string: {
|
2021-11-18 15:48:05 +03:00
|
|
|
ApplicationLabelChunter: '' as IntlString,
|
2022-02-23 19:10:11 +03:00
|
|
|
MentionedIn: '' as IntlString,
|
|
|
|
Content: '' as IntlString,
|
|
|
|
Comment: '' as IntlString,
|
|
|
|
Reference: '' as IntlString,
|
2022-04-02 07:08:37 +03:00
|
|
|
CreateBy: '' as IntlString,
|
2022-04-05 11:01:03 +03:00
|
|
|
Create: '' as IntlString,
|
2022-04-15 11:53:57 +03:00
|
|
|
Edit: '' as IntlString,
|
2022-04-06 08:35:52 +03:00
|
|
|
MarkUnread: '' as IntlString,
|
2022-04-14 11:53:33 +03:00
|
|
|
LastMessage: '' as IntlString,
|
2023-04-25 11:34:38 +03:00
|
|
|
MentionNotification: '' as IntlString,
|
2022-04-21 08:39:49 +03:00
|
|
|
PinnedMessages: '' as IntlString,
|
2022-05-31 16:01:24 +03:00
|
|
|
SavedMessages: '' as IntlString,
|
2022-11-27 19:05:26 +03:00
|
|
|
Emoji: '' as IntlString,
|
2023-04-25 11:34:38 +03:00
|
|
|
DM: '' as IntlString,
|
|
|
|
DMNotification: '' as IntlString,
|
2023-04-25 10:34:10 +03:00
|
|
|
ConfigLabel: '' as IntlString,
|
2023-12-11 14:54:36 +03:00
|
|
|
ConfigDescription: '' as IntlString,
|
2024-01-11 17:46:11 +03:00
|
|
|
Reacted: '' as IntlString,
|
|
|
|
RepliedToThread: '' as IntlString
|
2021-08-07 18:23:13 +03:00
|
|
|
},
|
|
|
|
viewlet: {
|
|
|
|
Chat: '' as Ref<ViewletDescriptor>
|
2021-11-18 15:48:05 +03:00
|
|
|
},
|
|
|
|
ids: {
|
|
|
|
TxCommentCreate: '' as Ref<TxViewlet>,
|
2022-01-19 12:04:30 +03:00
|
|
|
TxCommentRemove: '' as Ref<TxViewlet>,
|
2023-04-25 11:34:38 +03:00
|
|
|
TxMessageCreate: '' as Ref<TxViewlet>,
|
2023-12-11 14:54:36 +03:00
|
|
|
TxChatMessageCreate: '' as Ref<TxViewlet>,
|
|
|
|
TxChatMessageRemove: '' as Ref<TxViewlet>,
|
2024-03-07 09:53:07 +03:00
|
|
|
ChunterNotificationGroup: '' as Ref<NotificationGroup>
|
2021-11-18 15:48:05 +03:00
|
|
|
},
|
|
|
|
activity: {
|
2022-01-19 12:04:30 +03:00
|
|
|
TxCommentCreate: '' as AnyComponent,
|
2024-03-07 09:53:07 +03:00
|
|
|
TxMessageCreate: '' as AnyComponent
|
2021-12-08 12:07:05 +03:00
|
|
|
},
|
|
|
|
space: {
|
|
|
|
General: '' as Ref<Channel>,
|
|
|
|
Random: '' as Ref<Channel>
|
2022-05-31 16:01:24 +03:00
|
|
|
},
|
|
|
|
function: {
|
2023-03-15 17:06:03 +03:00
|
|
|
GetLink: '' as Resource<(doc: Doc, props: Record<string, any>) => Promise<string>>,
|
2024-01-11 17:46:11 +03:00
|
|
|
GetFragment: '' as Resource<(doc: Doc, props: Record<string, any>) => Promise<Location>>,
|
|
|
|
DmIdentifierProvider: '' as Resource<<T extends Doc>(client: Client, ref: Ref<T>, doc?: T) => Promise<string>>,
|
|
|
|
CanDeleteMessage: '' as Resource<(doc?: Doc | Doc[]) => Promise<boolean>>,
|
2024-02-02 12:43:50 +03:00
|
|
|
CanCopyMessageLink: '' as Resource<(doc?: Doc | Doc[]) => Promise<boolean>>,
|
2024-02-08 15:26:00 +03:00
|
|
|
GetChunterSpaceLinkFragment: '' as Resource<(doc: Doc, props: Record<string, any>) => Promise<Location>>,
|
|
|
|
GetThreadLink: '' as Resource<(doc: Doc, props: Record<string, any>) => Promise<Location>>
|
2022-11-27 19:05:26 +03:00
|
|
|
},
|
|
|
|
filter: {
|
2023-12-13 18:59:11 +03:00
|
|
|
ChatMessagesFilter: '' as Resource<(message: ActivityMessage, _class?: Ref<Doc>) => boolean>
|
2022-01-19 12:04:30 +03:00
|
|
|
}
|
2021-08-07 18:23:13 +03:00
|
|
|
})
|