rename editable kind

This commit is contained in:
Niels Lyngsø
2024-04-02 10:53:20 +02:00
parent edbcefcbed
commit 04667635d8
6 changed files with 3 additions and 28 deletions

View File

@@ -39,11 +39,7 @@ import type { ManifestLocalization } from './localization.model.js';
import type { ManifestTree } from './tree.model.js';
import type { ManifestTreeItem } from './tree-item.model.js';
import type { ManifestUserProfileApp } from './user-profile-app.model.js';
import type {
ManifestWorkspace,
ManifestWorkspaceRoutableKind,
ManifestWorkspaceEditableKind,
} from './workspace.model.js';
import type { ManifestWorkspace, ManifestWorkspaceRoutableKind } from './workspace.model.js';
import type { ManifestWorkspaceAction, ManifestWorkspaceActionDefaultKind } from './workspace-action.model.js';
import type { ManifestWorkspaceActionMenuItem } from './workspace-action-menu-item.model.js';
import type { ManifestWorkspaceContext } from './workspace-context.model.js';

View File

@@ -25,11 +25,3 @@ export interface ManifestWorkspaceRoutableKind
}
export interface MetaWorkspaceRoutableKind extends MetaWorkspace {}
export interface ManifestWorkspaceEditableKind
extends ManifestWorkspace<MetaWorkspaceEditableKind, UmbControllerHostElement, UmbEditableWorkspaceContext> {
type: 'workspace';
kind: 'routable';
}
export interface MetaWorkspaceEditableKind extends MetaWorkspace {}

View File

@@ -129,6 +129,7 @@ export abstract class UmbSubmittableWorkspaceContextBase<WorkspaceDataModelType>
/*
* @deprecated Use UmbSubmittableWorkspaceContextBase instead — Will be removed before RC.
* Rename `save` to `submit` and return a promise that resolves to true when save is complete.
* TODO: Delete before RC.
*/
export abstract class UmbEditableWorkspaceContextBase<

View File

@@ -1,3 +0,0 @@
import type { UmbRoutableWorkspaceContext } from '../../index.js';
export interface UmbEditableWorkspaceContext extends UmbRoutableWorkspaceContext {}

View File

@@ -1,10 +0,0 @@
import type { UmbEditableWorkspaceContext } from './editable-workspace-context.interface.js';
import type { UmbWorkspaceContext } from './workspace-context.interface.js';
import { UmbContextToken } from '@umbraco-cms/backoffice/context-api';
export const UMB_EDITABLE_WORKSPACE_CONTEXT = new UmbContextToken<UmbWorkspaceContext, UmbEditableWorkspaceContext>(
'UmbWorkspaceContext',
undefined,
// TODO: Make proper discriminator:
(context): context is UmbEditableWorkspaceContext => 'routes' in context,
);

View File

@@ -5,7 +5,6 @@ import type { UmbPropertyDatasetContext } from '@umbraco-cms/backoffice/property
import type {
UmbInvariantDatasetWorkspaceContext,
UmbRoutableWorkspaceContext,
UmbEditableWorkspaceContext,
} from '@umbraco-cms/backoffice/workspace';
import {
UmbSubmittableWorkspaceContextBase,
@@ -34,7 +33,7 @@ import { UmbRequestReloadStructureForEntityEvent } from '@umbraco-cms/backoffice
type EntityType = UmbDataTypeDetailModel;
export class UmbDataTypeWorkspaceContext
extends UmbSubmittableWorkspaceContextBase<EntityType>
implements UmbInvariantDatasetWorkspaceContext, UmbRoutableWorkspaceContext, UmbEditableWorkspaceContext
implements UmbInvariantDatasetWorkspaceContext, UmbRoutableWorkspaceContext
{
//
public readonly repository: UmbDataTypeDetailRepository = new UmbDataTypeDetailRepository(this);