rename collection workspace interface
This commit is contained in:
@@ -2,9 +2,17 @@ import type { UmbWorkspaceContextInterface } from './workspace-context.interface
|
||||
import type { Observable } from '@umbraco-cms/backoffice/external/rxjs';
|
||||
import type { UmbContentTypeModel, UmbContentTypeStructureManager } from '@umbraco-cms/backoffice/content-type';
|
||||
|
||||
export interface UmbWorkspaceCollectionContextInterface<T extends UmbContentTypeModel>
|
||||
export interface UmbCollectionWorkspaceContextInterface<T extends UmbContentTypeModel>
|
||||
extends UmbWorkspaceContextInterface {
|
||||
contentTypeHasCollection: Observable<boolean>;
|
||||
getCollectionAlias(): string;
|
||||
structure: UmbContentTypeStructureManager<T>;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use UmbCollectionWorkspaceContextInterface instead — Will be removed before RC.
|
||||
* TODO: Delete before RC.
|
||||
*/
|
||||
export interface UmbWorkspaceCollectionContextInterface<T extends UmbContentTypeModel>
|
||||
extends UmbCollectionWorkspaceContextInterface<T>
|
||||
|
||||
|
||||
@@ -2,15 +2,15 @@ import { UmbContextToken } from '@umbraco-cms/backoffice/context-api';
|
||||
import type { UmbContentTypeModel } from '@umbraco-cms/backoffice/content-type';
|
||||
import type {
|
||||
UmbWorkspaceContextInterface,
|
||||
UmbWorkspaceCollectionContextInterface,
|
||||
UmbCollectionWorkspaceContextInterface,
|
||||
} from '@umbraco-cms/backoffice/workspace';
|
||||
|
||||
export const UMB_WORKSPACE_COLLECTION_CONTEXT = new UmbContextToken<
|
||||
UmbWorkspaceContextInterface,
|
||||
UmbWorkspaceCollectionContextInterface<UmbContentTypeModel>
|
||||
UmbCollectionWorkspaceContextInterface<UmbContentTypeModel>
|
||||
>(
|
||||
'UmbWorkspaceContext',
|
||||
undefined,
|
||||
(context): context is UmbWorkspaceCollectionContextInterface<UmbContentTypeModel> =>
|
||||
(context as UmbWorkspaceCollectionContextInterface<UmbContentTypeModel>).contentTypeHasCollection !== undefined,
|
||||
(context): context is UmbCollectionWorkspaceContextInterface<UmbContentTypeModel> =>
|
||||
(context as UmbCollectionWorkspaceContextInterface<UmbContentTypeModel>).contentTypeHasCollection !== undefined,
|
||||
);
|
||||
|
||||
@@ -28,7 +28,7 @@ import {
|
||||
UmbWorkspaceSplitViewManager,
|
||||
} from '@umbraco-cms/backoffice/workspace';
|
||||
import type {
|
||||
UmbWorkspaceCollectionContextInterface,
|
||||
UmbCollectionWorkspaceContextInterface,
|
||||
UmbVariantDatasetWorkspaceContextInterface,
|
||||
UmbPublishableWorkspaceContextInterface,
|
||||
UmbRoutableWorkspaceContext,
|
||||
@@ -56,7 +56,7 @@ export class UmbDocumentWorkspaceContext
|
||||
UmbRoutableWorkspaceContext,
|
||||
UmbVariantDatasetWorkspaceContextInterface<UmbDocumentVariantModel>,
|
||||
UmbPublishableWorkspaceContextInterface,
|
||||
UmbWorkspaceCollectionContextInterface<UmbDocumentTypeDetailModel>
|
||||
UmbCollectionWorkspaceContextInterface<UmbDocumentTypeDetailModel>
|
||||
{
|
||||
public readonly repository = new UmbDocumentDetailRepository(this);
|
||||
public readonly publishingRepository = new UmbDocumentPublishingRepository(this);
|
||||
|
||||
@@ -6,7 +6,7 @@ import type { UmbMediaDetailModel, UmbMediaVariantModel, UmbMediaVariantOptionMo
|
||||
import { UMB_INVARIANT_CULTURE, UmbVariantId } from '@umbraco-cms/backoffice/variant';
|
||||
import { UmbContentTypeStructureManager } from '@umbraco-cms/backoffice/content-type';
|
||||
import type {
|
||||
UmbWorkspaceCollectionContextInterface,
|
||||
UmbCollectionWorkspaceContextInterface,
|
||||
UmbVariantDatasetWorkspaceContextInterface,
|
||||
} from '@umbraco-cms/backoffice/workspace';
|
||||
import {
|
||||
@@ -36,7 +36,7 @@ export class UmbMediaWorkspaceContext
|
||||
extends UmbSaveableWorkspaceContextBase<EntityType>
|
||||
implements
|
||||
UmbVariantDatasetWorkspaceContextInterface,
|
||||
UmbWorkspaceCollectionContextInterface<UmbMediaTypeDetailModel>
|
||||
UmbCollectionWorkspaceContextInterface<UmbMediaTypeDetailModel>
|
||||
{
|
||||
//
|
||||
public readonly repository = new UmbMediaDetailRepository(this);
|
||||
|
||||
Reference in New Issue
Block a user