Skip to content

Commit

Permalink
Merge pull request #2290 from umbraco/v15/emm-search
Browse files Browse the repository at this point in the history
Feature: Extension Manifest Map: Search
  • Loading branch information
nielslyngsoe authored Sep 13, 2024
2 parents 76d5721 + 2da6203 commit cb7207e
Show file tree
Hide file tree
Showing 14 changed files with 26 additions and 24 deletions.
6 changes: 0 additions & 6 deletions src/packages/core/extension-registry/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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';
Expand Down Expand Up @@ -184,8 +180,6 @@ export type ManifestTypes =
| ManifestPropertyEditorSchema
| ManifestPropertyEditorUi
| ManifestRepository
| ManifestSearchProvider
| ManifestSearchResultItem
| ManifestSection
| ManifestSectionRoute
| ManifestSectionSidebarApp
Expand Down
3 changes: 1 addition & 2 deletions src/packages/data-type/search/manifests.ts
Original file line number Diff line number Diff line change
@@ -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<ManifestTypes> = [
export const manifests: Array<UmbExtensionManifest> = [
{
name: 'Data Type Search Provider',
alias: 'Umb.SearchProvider.DataType',
Expand Down
3 changes: 1 addition & 2 deletions src/packages/documents/document-types/search/manifests.ts
Original file line number Diff line number Diff line change
@@ -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<ManifestTypes> = [
export const manifests: Array<UmbExtensionManifest> = [
{
name: 'Document Type Search Provider',
alias: UMB_DOCUMENT_TYPE_SEARCH_PROVIDER_ALIAS,
Expand Down
3 changes: 1 addition & 2 deletions src/packages/documents/documents/search/manifests.ts
Original file line number Diff line number Diff line change
@@ -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<ManifestTypes> = [
export const manifests: Array<UmbExtensionManifest> = [
{
name: 'Document Search Provider',
alias: UMB_DOCUMENT_SEARCH_PROVIDER_ALIAS,
Expand Down
3 changes: 1 addition & 2 deletions src/packages/media/media-types/search/manifests.ts
Original file line number Diff line number Diff line change
@@ -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<ManifestTypes> = [
export const manifests: Array<UmbExtensionManifest> = [
{
name: 'Media Type Search Provider',
alias: 'Umb.SearchProvider.MediaType',
Expand Down
3 changes: 1 addition & 2 deletions src/packages/media/media/search/manifests.ts
Original file line number Diff line number Diff line change
@@ -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<ManifestTypes> = [
export const manifests: Array<UmbExtensionManifest> = [
{
name: 'Media Search Provider',
alias: 'Umb.SearchProvider.Media',
Expand Down
3 changes: 1 addition & 2 deletions src/packages/members/member-type/search/manifests.ts
Original file line number Diff line number Diff line change
@@ -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<ManifestTypes> = [
export const manifests: Array<UmbExtensionManifest> = [
{
name: 'Member Type Search Provider',
alias: 'Umb.SearchProvider.MemberType',
Expand Down
3 changes: 1 addition & 2 deletions src/packages/members/member/search/manifests.ts
Original file line number Diff line number Diff line change
@@ -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<ManifestTypes> = [
export const manifests: Array<UmbExtensionManifest> = [
{
name: 'Member Search Provider',
alias: UMB_MEMBER_SEARCH_PROVIDER_ALIAS,
Expand Down
2 changes: 2 additions & 0 deletions src/packages/search/extensions/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from './search-provider.extension.js';
export * from './search-result-item.extension.js';
Original file line number Diff line number Diff line change
@@ -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';

/**
Expand All @@ -16,3 +16,9 @@ export interface MetaSearchProvider {
*/
label?: string;
}

declare global {
interface UmbExtensionManifestMap {
umbSearchProvider: ManifestSearchProvider;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,9 @@ export interface ManifestSearchResultItem extends ManifestElement {
type: 'searchResultItem';
forEntityTypes: Array<string>;
}

declare global {
interface UmbExtensionManifestMap {
umbSearchResultItem: ManifestSearchResultItem;
}
}
2 changes: 2 additions & 0 deletions src/packages/search/index.ts
Original file line number Diff line number Diff line change
@@ -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';
2 changes: 1 addition & 1 deletion src/packages/search/search-modal/search-modal.element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 1 addition & 2 deletions src/packages/templating/templates/search/manifests.ts
Original file line number Diff line number Diff line change
@@ -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<ManifestTypes> = [
export const manifests: Array<UmbExtensionManifest> = [
{
name: 'Template Search Provider',
alias: 'Umb.SearchProvider.Template',
Expand Down

0 comments on commit cb7207e

Please sign in to comment.