register repository manifests

This commit is contained in:
Niels Lyngsø
2024-07-31 11:31:16 +02:00
parent cce90c3c8e
commit fa16ea6639
3 changed files with 9 additions and 6 deletions

View File

@@ -90,17 +90,18 @@ export class UmbCompositionPickerModalElement extends UmbModalBaseElement<
await this.#init;
if (!this.#compositionRepository) return;
const isElement = this.data?.isElement;
const currentPropertyAliases = this.data?.currentPropertyAliases;
// Notice isElement is not available on all types that can be composed.
const isElement = this.data?.isElement ?? undefined;
const currentPropertyAliases = this.data?.currentPropertyAliases ?? [];
const { data } = await this.#compositionRepository.availableCompositions({
unique: this.#unique,
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
// TODO: isElement is not available on all types that can be composed.
isElement: isElement ?? false,
isElement: isElement,
currentCompositeUniques: this._selection,
currentPropertyAliases: currentPropertyAliases ?? [],
currentPropertyAliases: currentPropertyAliases,
});
if (!data) return;

View File

@@ -1,5 +1,6 @@
import { manifests as detailManifests } from './detail/manifests.js';
import { manifests as itemManifests } from './item/manifests.js';
import { manifests as compositionManifests } from './composition/manifests.js';
import type { ManifestTypes } from '@umbraco-cms/backoffice/extension-registry';
export const manifests: Array<ManifestTypes> = [...detailManifests, ...itemManifests];
export const manifests: Array<ManifestTypes> = [...detailManifests, ...itemManifests, ...compositionManifests];

View File

@@ -1,5 +1,6 @@
import { manifests as detailManifests } from './detail/manifests.js';
import { manifests as itemManifests } from './item/manifests.js';
import { manifests as compositionManifests } from './composition/manifests.js';
import type { ManifestTypes } from '@umbraco-cms/backoffice/extension-registry';
export const manifests: Array<ManifestTypes> = [...detailManifests, ...itemManifests];
export const manifests: Array<ManifestTypes> = [...detailManifests, ...itemManifests, ...compositionManifests];