Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UBER-799: Allow extensions to tracker for github #3727

Merged
merged 1 commit into from
Sep 21, 2023
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
2 changes: 1 addition & 1 deletion models/all/src/version.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ "major": 0, "minor": 6, "patch": 120 }
{ "major": 0, "minor": 6, "patch": 130 }
17 changes: 15 additions & 2 deletions models/presentation/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -40,6 +45,14 @@ export class TPresentationMiddlewareFactory extends TDoc implements Presentation
createPresentationMiddleware!: Resource<PresentationMiddlewareCreator>
}

@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)
builder.createModel(TObjectSearchCategory, TPresentationMiddlewareFactory, TComponentPointExtension)
}
Loading