mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-23 18:15:03 +02:00
UBER-799: Allow extensions to tracker for github (#3727)
This commit is contained in:
@@ -18,9 +18,14 @@ import { Builder, Model } from '@hcengineering/model'
|
||||
import core, { TDoc } from '@hcengineering/model-core'
|
||||
import { Asset, IntlString, Resource } from '@hcengineering/platform'
|
||||
// Import types to prevent .svelte components to being exposed to type typescript.
|
||||
import { ObjectSearchCategory, ObjectSearchFactory } from '@hcengineering/presentation/src/types'
|
||||
import {
|
||||
ComponentPointExtension,
|
||||
ObjectSearchCategory,
|
||||
ObjectSearchFactory
|
||||
} from '@hcengineering/presentation/src/types'
|
||||
import presentation from './plugin'
|
||||
import { PresentationMiddlewareCreator, PresentationMiddlewareFactory } from '@hcengineering/presentation'
|
||||
import { AnyComponent, ComponentExtensionId } from '@hcengineering/ui'
|
||||
|
||||
export { presentationId } from '@hcengineering/presentation/src/plugin'
|
||||
export { default } from './plugin'
|
||||
@@ -40,6 +45,14 @@ export class TPresentationMiddlewareFactory extends TDoc implements Presentation
|
||||
createPresentationMiddleware!: Resource<PresentationMiddlewareCreator>
|
||||
}
|
||||
|
||||
export function createModel (builder: Builder): void {
|
||||
builder.createModel(TObjectSearchCategory, TPresentationMiddlewareFactory)
|
||||
@Model(presentation.class.ComponentPointExtension, core.class.Doc, DOMAIN_MODEL)
|
||||
export class TComponentPointExtension extends TDoc implements ComponentPointExtension {
|
||||
extension!: ComponentExtensionId
|
||||
component!: AnyComponent
|
||||
props!: Record<string, any>
|
||||
order!: number
|
||||
}
|
||||
|
||||
export function createModel (builder: Builder): void {
|
||||
builder.createModel(TObjectSearchCategory, TPresentationMiddlewareFactory, TComponentPointExtension)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user