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

Extension Manifest Map: Ufm #2377

Merged
merged 10 commits into from
Sep 30, 2024
2 changes: 1 addition & 1 deletion examples/ufm-custom-component/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ManifestUfmComponent } from '@umbraco-cms/backoffice/extension-registry';
import type { ManifestUfmComponent } from '@umbraco-cms/backoffice/ufm';

export const manifests: Array<ManifestUfmComponent> = [
{
Expand Down
6 changes: 0 additions & 6 deletions src/packages/core/extension-registry/models/index.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
import type { ManifestDynamicRootOrigin, ManifestDynamicRootQueryStep } from './dynamic-root.model.js';
import type { ManifestFileUploadPreview } from './file-upload-preview.model.js';
import type { ManifestUfmComponent } from './ufm-component.model.js';
import type { ManifestUfmFilter } from './ufm-filter.model.js';
import type { ManifestBase, ManifestBundle, ManifestCondition } from '@umbraco-cms/backoffice/extension-api';

export type * from './dynamic-root.model.js';
export type * from './file-upload-preview.model.js';
export type * from './ufm-component.model.js';
export type * from './ufm-filter.model.js';

export type ManifestTypes =
| ManifestBundle<ManifestTypes>
| ManifestCondition
| ManifestDynamicRootOrigin
| ManifestDynamicRootQueryStep
| ManifestFileUploadPreview
| ManifestUfmComponent
| ManifestUfmFilter
| ManifestBase;

type UnionOfProperties<T> = T extends object ? T[keyof T] : never;
Expand Down
2 changes: 1 addition & 1 deletion src/packages/ufm/components/manifests.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ManifestUfmComponent } from '@umbraco-cms/backoffice/extension-registry';
import type { ManifestUfmComponent } from '../ufm-component.extension.js';

export const manifests: Array<ManifestUfmComponent> = [
{
Expand Down
2 changes: 1 addition & 1 deletion src/packages/ufm/components/ufm-component-base.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { UfmToken } from '../plugins/marked-ufm.plugin.js';
import type { UmbUfmComponentApi } from '@umbraco-cms/backoffice/extension-registry';
import type { UmbUfmComponentApi } from '../ufm-component.extension.js';

export abstract class UmbUfmComponentBase implements UmbUfmComponentApi {
protected getAttributes(text: string): string | null {
Expand Down
3 changes: 2 additions & 1 deletion src/packages/ufm/contexts/ufm.context.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import { ufm } from '../plugins/marked-ufm.plugin.js';
import type { UfmPlugin } from '../plugins/marked-ufm.plugin.js';
import type { ManifestUfmComponent } from '../ufm-component.extension.js';
import type { ManifestUfmFilter } from '../ufm-filter.extension.js';
import { DOMPurify } from '@umbraco-cms/backoffice/external/dompurify';
import { Marked } from '@umbraco-cms/backoffice/external/marked';
import { UmbArrayState } from '@umbraco-cms/backoffice/observable-api';
import { UmbContextBase } from '@umbraco-cms/backoffice/class-api';
import { UmbContextToken } from '@umbraco-cms/backoffice/context-api';
import { UmbExtensionsApiInitializer } from '@umbraco-cms/backoffice/extension-api';
import { umbExtensionsRegistry } from '@umbraco-cms/backoffice/extension-registry';
import type { ManifestUfmFilter, ManifestUfmComponent } from '@umbraco-cms/backoffice/extension-registry';
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
import type { UmbExtensionApiInitializer } from '@umbraco-cms/backoffice/extension-api';

Expand Down
2 changes: 1 addition & 1 deletion src/packages/ufm/filters/manifests.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ManifestUfmFilter } from '@umbraco-cms/backoffice/extension-registry';
import type { ManifestUfmFilter } from '../ufm-filter.extension.js';

export const manifests: Array<ManifestUfmFilter> = [
{
Expand Down
2 changes: 2 additions & 0 deletions src/packages/ufm/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ export * from './types.js';
export * from './components/index.js';
export * from './contexts/index.js';
export * from './plugins/index.js';
export * from './ufm-component.extension.js';
export * from './ufm-filter.extension.js';
2 changes: 1 addition & 1 deletion src/packages/ufm/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { UmbUfmFilterApi } from '@umbraco-cms/backoffice/extension-registry';
import type { UmbUfmFilterApi } from './ufm-filter.extension.js';

export abstract class UmbUfmFilterBase implements UmbUfmFilterApi {
abstract filter(...args: Array<unknown>): string | undefined | null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,9 @@ export interface ManifestUfmComponent extends ManifestApi<UmbUfmComponentApi> {
type: 'ufmComponent';
meta: MetaUfmComponent;
}

declare global {
interface UmbExtensionManifestMap {
umbUfmComponent: ManifestUfmComponent;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,9 @@ export interface ManifestUfmFilter extends ManifestApi<UmbUfmFilterApi> {
type: 'ufmFilter';
meta: MetaUfmFilter;
}

declare global {
interface UmbExtensionManifestMap {
umbUfmFilter: ManifestUfmFilter;
}
}
Loading