Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 31 additions & 1 deletion common/config/rush/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

54 changes: 54 additions & 0 deletions models/card/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -683,6 +683,60 @@ export function createModel (builder: Builder): void {
card.viewlet.CardRelationshipTable
)

builder.createDoc(
presentation.class.ComponentPointExtension,
core.space.Model,
{
extension: converter.extensions.CopyAsMarkdownAction,
component: converter.component.CopyAsMarkdownButton
},
converter.extensions.CopyAsMarkdownButton
)

builder.createDoc(
view.class.ViewletViewAction,
core.space.Model,
{
descriptor: view.viewlet.RelationshipTable,
extension: converter.extensions.CopyAsMarkdownAction,
applicableToClass: card.class.Card
},
card.specialViewAction.CardRelationshipTable
)

builder.createDoc(
view.class.ViewletViewAction,
core.space.Model,
{
descriptor: view.viewlet.Table,
extension: converter.extensions.CopyAsMarkdownAction,
applicableToClass: card.class.Card
},
card.specialViewAction.CardTable
)

builder.createDoc(
view.class.ViewletViewAction,
core.space.Model,
{
descriptor: view.viewlet.Table,
extension: converter.extensions.CopyAsMarkdownAction,
applicableToClass: card.class.Card
},
card.specialViewAction.CopyAsMarkdownTable
)

builder.createDoc(
view.class.ViewletViewAction,
core.space.Model,
{
descriptor: view.viewlet.RelationshipTable,
extension: converter.extensions.CopyAsMarkdownAction,
applicableToClass: card.class.Card
},
card.specialViewAction.CopyAsMarkdownRelationshipTable
)

builder.mixin(card.class.Card, core.class.Class, view.mixin.ObjectPresenter, {
presenter: card.component.CardPresenter
})
Expand Down
8 changes: 7 additions & 1 deletion models/card/src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
// limitations under the License.
//

import type { ViewletViewAction, Action, ActionCategory, ViewAction } from '@hcengineering/view'
import { type Card, cardId } from '@hcengineering/card'
import card from '@hcengineering/card-resources/src/plugin'
import type { Client, Doc, Ref } from '@hcengineering/core'
import {} from '@hcengineering/core'
import { mergeIds, type Resource } from '@hcengineering/platform'
import { type TagCategory } from '@hcengineering/tags'
import { type Location, type ResolvedLocation } from '@hcengineering/ui/src/types'
import { type Action, type ActionCategory, type ViewAction } from '@hcengineering/view'
import { type LocationData } from '@hcengineering/workbench'

export default mergeIds(cardId, card, {
Expand All @@ -43,6 +43,12 @@ export default mergeIds(cardId, card, {
Card: '' as Ref<ActionCategory>,
Labels: '' as Ref<TagCategory>
},
specialViewAction: {
CardRelationshipTable: '' as Ref<ViewletViewAction>,
CardTable: '' as Ref<ViewletViewAction>,
CopyAsMarkdownTable: '' as Ref<ViewletViewAction>,
CopyAsMarkdownRelationshipTable: '' as Ref<ViewletViewAction>
},
ids: {
MasterTags: '' as Ref<Doc>,
ManageMasterTags: '' as Ref<Doc>,
Expand Down
34 changes: 24 additions & 10 deletions models/controlled-documents/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import documentsPlugin, {
DocumentState,
type Document,
type DocumentSpace,
type DocumentTemplate,
type ProjectDocument,
type ChangeControl,
type DocumentRequest
Expand All @@ -43,7 +44,7 @@ import setting from '@hcengineering/setting'
import tags from '@hcengineering/tags'
import textEditor from '@hcengineering/text-editor'

import { AccountRole, type ClassCollaborators, type Class, type Doc, type Ref } from '@hcengineering/core'
import { AccountRole, type ClassCollaborators, type Class, type Doc, type Lookup, type Ref } from '@hcengineering/core'
import { type Action } from '@hcengineering/view'
import { definePermissions } from './permissions'
import documents from './plugin'
Expand Down Expand Up @@ -255,6 +256,11 @@ export function createModel (builder: Builder): void {
)

// Workflow
const documentTableLookup: Lookup<Document> = {
owner: contact.mixin.Employee,
category: documents.class.DocumentCategory,
template: documents.mixin.DocumentTemplate
}
builder.createDoc(
view.class.Viewlet,
core.space.Model,
Expand Down Expand Up @@ -308,16 +314,27 @@ export function createModel (builder: Builder): void {
'modifiedOn'
],
options: {
lookup: {
owner: contact.mixin.Employee,
category: documents.class.DocumentCategory,
template: documents.mixin.DocumentTemplate
}
lookup: documentTableLookup
}
},
documents.viewlet.TableDocument
)

builder.createDoc(
view.class.ViewletViewAction,
core.space.Model,
{
descriptor: view.viewlet.Table,
extension: converter.extensions.CopyAsMarkdownAction,
applicableToClass: documents.class.Document
},
documents.specialViewAction.TableDocument
)

const documentTemplateTableLookup: Lookup<DocumentTemplate> = {
owner: contact.mixin.Employee,
category: documents.class.DocumentCategory
}
builder.createDoc(
view.class.Viewlet,
core.space.Model,
Expand Down Expand Up @@ -367,10 +384,7 @@ export function createModel (builder: Builder): void {
hiddenKeys: ['attachedTo']
},
options: {
lookup: {
owner: contact.mixin.Employee,
category: documents.class.DocumentCategory
}
lookup: documentTemplateTableLookup
}
},
documents.viewlet.TableDocumentTemplate
Expand Down
13 changes: 8 additions & 5 deletions models/controlled-documents/src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { type ObjectSearchCategory, type ObjectSearchFactory } from '@hcengineer
import { mergeIds, type Resource } from '@hcengineering/platform'
import { type TagCategory } from '@hcengineering/tags'
import { type AnyComponent } from '@hcengineering/ui/src/types'
import { type ActionCategory, type ViewAction } from '@hcengineering/view'
import type { ActionCategory, ViewAction, Viewlet, ViewletViewAction } from '@hcengineering/view'
import { type NotificationType, type NotificationGroup } from '@hcengineering/notification'
import { type TextActionVisibleFunction, type TextActionFunction } from '@hcengineering/text-editor'

Expand Down Expand Up @@ -78,11 +78,14 @@ export default mergeIds(documentsId, documents, {
TransferDocument: '' as ViewAction,
EditDocSpace: '' as ViewAction
},
specialViewAction: {
TableDocument: '' as Ref<ViewletViewAction>
},
viewlet: {
TableDocument: '' as Ref<Doc>,
ListDocument: '' as Ref<Doc>,
TableDocumentTemplate: '' as Ref<Doc>,
TableDocumentDomain: '' as Ref<Doc>
TableDocument: '' as Ref<Viewlet>,
ListDocument: '' as Ref<Viewlet>,
TableDocumentTemplate: '' as Ref<Viewlet>,
TableDocumentDomain: '' as Ref<Viewlet>
},
notification: {
DocumentsNotificationGroup: '' as Ref<NotificationGroup>,
Expand Down
9 changes: 4 additions & 5 deletions models/recruit/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -323,14 +323,13 @@ export function createModel (builder: Builder): void {
}
}
builder.createDoc(
workbench.class.ViewletSpecialViewAction,
view.class.ViewletViewAction,
core.space.Model,
{
attachedTo: recruit.viewlet.TableCandidate,
attachedToClass: view.class.Viewlet,
collection: 'specialViewActions',
descriptor: view.viewlet.Table,
extension: workbench.extensions.SpecialViewAction,
config: tableCandidateExportConfig
config: tableCandidateExportConfig,
applicableToClass: recruit.mixin.Candidate
},
recruit.specialViewAction.TableCandidate
)
Expand Down
6 changes: 3 additions & 3 deletions models/recruit/src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ import { recruitId } from '@hcengineering/recruit'
import recruit from '@hcengineering/recruit-resources/src/plugin'
import { type ProjectType, type TaskTypeDescriptor } from '@hcengineering/task'
import type { AnyComponent, Location } from '@hcengineering/ui/src/types'
import type { ViewletSpecialViewAction } from '@hcengineering/workbench'
import type {
Action,
ActionCategory,
ViewAction,
ViewActionAvailabilityFunction,
ViewQueryAction,
Viewlet
Viewlet,
ViewletViewAction
} from '@hcengineering/view'

export default mergeIds(recruitId, recruit, {
Expand Down Expand Up @@ -134,7 +134,7 @@ export default mergeIds(recruitId, recruit, {
DefaultVacancy: '' as Ref<ProjectType>
},
specialViewAction: {
TableCandidate: '' as Ref<ViewletSpecialViewAction>
TableCandidate: '' as Ref<ViewletViewAction>
},
viewlet: {
TableCandidate: '' as Ref<Viewlet>,
Expand Down
11 changes: 11 additions & 0 deletions models/tracker/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,17 @@ export function createModel (builder: Builder): void {

defineViewlets(builder)

builder.createDoc(
view.class.ViewletViewAction,
core.space.Model,
{
descriptor: view.viewlet.List,
extension: converter.extensions.CopyAsMarkdownAction,
applicableToClass: tracker.class.Issue
},
tracker.specialViewAction.IssueList
)

const issuesId = 'issues'
const componentsId = 'components'
const milestonesId = 'milestones'
Expand Down
5 changes: 4 additions & 1 deletion models/tracker/src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { type ProjectType } from '@hcengineering/task'
import { trackerId } from '@hcengineering/tracker'
import tracker from '@hcengineering/tracker-resources/src/plugin'
import type { AnyComponent } from '@hcengineering/ui/src/types'
import { type Action, type ViewAction, type Viewlet } from '@hcengineering/view'
import { type Action, type ViewAction, type Viewlet, type ViewletViewAction } from '@hcengineering/view'
import { type Application } from '@hcengineering/workbench'

export default mergeIds(trackerId, tracker, {
Expand Down Expand Up @@ -63,6 +63,9 @@ export default mergeIds(trackerId, tracker, {
app: {
Tracker: '' as Ref<Application>
},
specialViewAction: {
IssueList: '' as Ref<ViewletViewAction>
},
viewlet: {
IssueList: '' as Ref<Viewlet>,
IssueTemplateList: '' as Ref<Viewlet>,
Expand Down
Loading