diff --git a/src/packages/core/extension-registry/models/index.ts b/src/packages/core/extension-registry/models/index.ts index 503ba9cc77..5d638edff8 100644 --- a/src/packages/core/extension-registry/models/index.ts +++ b/src/packages/core/extension-registry/models/index.ts @@ -60,8 +60,6 @@ import type { import type { ManifestEntityUserPermission } from './entity-user-permission.model.js'; import type { ManifestGranularUserPermission } from './user-granular-permission.model.js'; import type { ManifestMfaLoginProvider } from './mfa-login-provider.model.js'; -import type { ManifestSearchProvider } from './search-provider.model.js'; -import type { ManifestSearchResultItem } from './search-result-item.model.js'; import type { ManifestAppEntryPoint } from './app-entry-point.model.js'; import type { ManifestBackofficeEntryPoint } from './backoffice-entry-point.model.js'; import type { ManifestEntryPoint } from './entry-point.model.js'; @@ -97,8 +95,6 @@ export type * from './preview-app.model.js'; export type * from './property-action.model.js'; export type * from './property-editor.model.js'; export type * from './repository.model.js'; -export type * from './search-provider.model.js'; -export type * from './search-result-item.model.js'; export type * from './section-sidebar-app.model.js'; export type * from './section-view.model.js'; export type * from './section.model.js'; @@ -184,8 +180,6 @@ export type ManifestTypes = | ManifestPropertyEditorSchema | ManifestPropertyEditorUi | ManifestRepository - | ManifestSearchProvider - | ManifestSearchResultItem | ManifestSection | ManifestSectionRoute | ManifestSectionSidebarApp diff --git a/src/packages/data-type/search/manifests.ts b/src/packages/data-type/search/manifests.ts index 248c1d2ccf..b3de884796 100644 --- a/src/packages/data-type/search/manifests.ts +++ b/src/packages/data-type/search/manifests.ts @@ -1,7 +1,6 @@ import { UMB_DATA_TYPE_ENTITY_TYPE } from '../entity.js'; -import type { ManifestTypes } from '@umbraco-cms/backoffice/extension-registry'; -export const manifests: Array = [ +export const manifests: Array = [ { name: 'Data Type Search Provider', alias: 'Umb.SearchProvider.DataType', diff --git a/src/packages/documents/document-types/search/manifests.ts b/src/packages/documents/document-types/search/manifests.ts index 503ee26f29..e8f9d5c38c 100644 --- a/src/packages/documents/document-types/search/manifests.ts +++ b/src/packages/documents/document-types/search/manifests.ts @@ -1,8 +1,7 @@ import { UMB_DOCUMENT_TYPE_ENTITY_TYPE } from '../entity.js'; import { UMB_DOCUMENT_TYPE_SEARCH_PROVIDER_ALIAS } from './constants.js'; -import type { ManifestTypes } from '@umbraco-cms/backoffice/extension-registry'; -export const manifests: Array = [ +export const manifests: Array = [ { name: 'Document Type Search Provider', alias: UMB_DOCUMENT_TYPE_SEARCH_PROVIDER_ALIAS, diff --git a/src/packages/documents/documents/search/manifests.ts b/src/packages/documents/documents/search/manifests.ts index f9d8b8dce2..b8229f3f59 100644 --- a/src/packages/documents/documents/search/manifests.ts +++ b/src/packages/documents/documents/search/manifests.ts @@ -1,8 +1,7 @@ import { UMB_DOCUMENT_ENTITY_TYPE } from '../entity.js'; import { UMB_DOCUMENT_SEARCH_PROVIDER_ALIAS } from './constants.js'; -import type { ManifestTypes } from '@umbraco-cms/backoffice/extension-registry'; -export const manifests: Array = [ +export const manifests: Array = [ { name: 'Document Search Provider', alias: UMB_DOCUMENT_SEARCH_PROVIDER_ALIAS, diff --git a/src/packages/media/media-types/search/manifests.ts b/src/packages/media/media-types/search/manifests.ts index b077dfb5be..649b46b431 100644 --- a/src/packages/media/media-types/search/manifests.ts +++ b/src/packages/media/media-types/search/manifests.ts @@ -1,7 +1,6 @@ import { UMB_MEDIA_TYPE_ENTITY_TYPE } from '../entity.js'; -import type { ManifestTypes } from '@umbraco-cms/backoffice/extension-registry'; -export const manifests: Array = [ +export const manifests: Array = [ { name: 'Media Type Search Provider', alias: 'Umb.SearchProvider.MediaType', diff --git a/src/packages/media/media/search/manifests.ts b/src/packages/media/media/search/manifests.ts index 6da2255c34..73a1508bf8 100644 --- a/src/packages/media/media/search/manifests.ts +++ b/src/packages/media/media/search/manifests.ts @@ -1,7 +1,6 @@ import { UMB_MEDIA_ENTITY_TYPE } from '../entity.js'; -import type { ManifestTypes } from '@umbraco-cms/backoffice/extension-registry'; -export const manifests: Array = [ +export const manifests: Array = [ { name: 'Media Search Provider', alias: 'Umb.SearchProvider.Media', diff --git a/src/packages/members/member-type/search/manifests.ts b/src/packages/members/member-type/search/manifests.ts index 786dd15a9d..ef5b13f9d8 100644 --- a/src/packages/members/member-type/search/manifests.ts +++ b/src/packages/members/member-type/search/manifests.ts @@ -1,7 +1,6 @@ import { UMB_MEMBER_TYPE_ENTITY_TYPE } from '../entity.js'; -import type { ManifestTypes } from '@umbraco-cms/backoffice/extension-registry'; -export const manifests: Array = [ +export const manifests: Array = [ { name: 'Member Type Search Provider', alias: 'Umb.SearchProvider.MemberType', diff --git a/src/packages/members/member/search/manifests.ts b/src/packages/members/member/search/manifests.ts index e6b5c3845e..e191b088b8 100644 --- a/src/packages/members/member/search/manifests.ts +++ b/src/packages/members/member/search/manifests.ts @@ -1,8 +1,7 @@ import { UMB_MEMBER_ENTITY_TYPE } from '../entity.js'; import { UMB_MEMBER_SEARCH_PROVIDER_ALIAS } from './constants.js'; -import type { ManifestTypes } from '@umbraco-cms/backoffice/extension-registry'; -export const manifests: Array = [ +export const manifests: Array = [ { name: 'Member Search Provider', alias: UMB_MEMBER_SEARCH_PROVIDER_ALIAS, diff --git a/src/packages/search/extensions/index.ts b/src/packages/search/extensions/index.ts new file mode 100644 index 0000000000..860d89e272 --- /dev/null +++ b/src/packages/search/extensions/index.ts @@ -0,0 +1,2 @@ +export * from './search-provider.extension.js'; +export * from './search-result-item.extension.js'; diff --git a/src/packages/core/extension-registry/models/search-provider.model.ts b/src/packages/search/extensions/search-provider.extension.ts similarity index 80% rename from src/packages/core/extension-registry/models/search-provider.model.ts rename to src/packages/search/extensions/search-provider.extension.ts index c5c7e7b6ed..d827200230 100644 --- a/src/packages/core/extension-registry/models/search-provider.model.ts +++ b/src/packages/search/extensions/search-provider.extension.ts @@ -1,4 +1,4 @@ -import type { UmbSearchProvider, UmbSearchResultItemModel } from '@umbraco-cms/backoffice/search'; +import type { UmbSearchProvider, UmbSearchResultItemModel } from '../types.js'; import type { ManifestApi } from '@umbraco-cms/backoffice/extension-api'; /** @@ -16,3 +16,9 @@ export interface MetaSearchProvider { */ label?: string; } + +declare global { + interface UmbExtensionManifestMap { + umbSearchProvider: ManifestSearchProvider; + } +} diff --git a/src/packages/core/extension-registry/models/search-result-item.model.ts b/src/packages/search/extensions/search-result-item.extension.ts similarity index 70% rename from src/packages/core/extension-registry/models/search-result-item.model.ts rename to src/packages/search/extensions/search-result-item.extension.ts index 26d3b338d1..b4d47b12d8 100644 --- a/src/packages/core/extension-registry/models/search-result-item.model.ts +++ b/src/packages/search/extensions/search-result-item.extension.ts @@ -7,3 +7,9 @@ export interface ManifestSearchResultItem extends ManifestElement { type: 'searchResultItem'; forEntityTypes: Array; } + +declare global { + interface UmbExtensionManifestMap { + umbSearchResultItem: ManifestSearchResultItem; + } +} diff --git a/src/packages/search/index.ts b/src/packages/search/index.ts index 264c82d513..c750f51952 100644 --- a/src/packages/search/index.ts +++ b/src/packages/search/index.ts @@ -1,3 +1,5 @@ export type { UmbSearchResultItemModel, UmbSearchRequestArgs, UmbSearchProvider } from './types.js'; export type { UmbSearchDataSource } from './search-data-source.interface.js'; export type { UmbSearchRepository } from './search-repository.interface.js'; + +export * from './extensions/index.js'; diff --git a/src/packages/search/search-modal/search-modal.element.ts b/src/packages/search/search-modal/search-modal.element.ts index c45fdeee1f..1de42cf897 100644 --- a/src/packages/search/search-modal/search-modal.element.ts +++ b/src/packages/search/search-modal/search-modal.element.ts @@ -10,13 +10,13 @@ import { state, property, } from '@umbraco-cms/backoffice/external/lit'; -import type { ManifestSearchResultItem } from '@umbraco-cms/backoffice/extension-registry'; import { umbExtensionsRegistry } from '@umbraco-cms/backoffice/extension-registry'; import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element'; import { UmbExtensionsManifestInitializer, createExtensionApi } from '@umbraco-cms/backoffice/extension-api'; import '../search-result/search-result-item.element.js'; import type { UmbModalContext } from '@umbraco-cms/backoffice/modal'; +import type { ManifestSearchResultItem } from '../extensions/index.js'; type SearchProvider = { name: string; diff --git a/src/packages/templating/templates/search/manifests.ts b/src/packages/templating/templates/search/manifests.ts index 04c046c23b..e105f12be5 100644 --- a/src/packages/templating/templates/search/manifests.ts +++ b/src/packages/templating/templates/search/manifests.ts @@ -1,7 +1,6 @@ import { UMB_TEMPLATE_ENTITY_TYPE } from '../entity.js'; -import type { ManifestTypes } from '@umbraco-cms/backoffice/extension-registry'; -export const manifests: Array = [ +export const manifests: Array = [ { name: 'Template Search Provider', alias: 'Umb.SearchProvider.Template',