include entity in name context name

This commit is contained in:
Mads Rasmussen
2024-05-02 09:47:48 +02:00
parent 233511bff4
commit 3bb57b6877
4 changed files with 13 additions and 11 deletions

View File

@@ -0,0 +1,6 @@
import type { UmbEntityIsTrashedContext } from './entity-is-trashed.context.js';
import { UmbContextToken } from '@umbraco-cms/backoffice/context-api';
export const UMB_ENTITY_IS_TRASHED_CONTEXT = new UmbContextToken<UmbEntityIsTrashedContext>(
'UmbEntityIsTrashedContext',
);

View File

@@ -1,4 +1,4 @@
import { UMB_IS_TRASHED_CONTEXT } from './is-trashed.context-token.js';
import { UMB_ENTITY_IS_TRASHED_CONTEXT } from './entity-is-trashed.context-token.js';
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
import { UmbContextBase } from '@umbraco-cms/backoffice/class-api';
import { UmbBooleanState } from '@umbraco-cms/backoffice/observable-api';
@@ -7,15 +7,15 @@ import { UmbBooleanState } from '@umbraco-cms/backoffice/observable-api';
* Represents the context for the isTrashed state
* @export
* @class UmbIsTrashedContext
* @extends {UmbContextBase<UmbIsTrashedContext>}
* @implements {UmbIsTrashedContext}
* @extends {UmbContextBase<UmbEntityIsTrashedContext>}
* @implements {UmbEntityIsTrashedContext}
*/
export class UmbIsTrashedContext extends UmbContextBase<UmbIsTrashedContext> {
export class UmbEntityIsTrashedContext extends UmbContextBase<UmbEntityIsTrashedContext> {
#isTrashed = new UmbBooleanState(false);
isTrashed = this.#isTrashed.asObservable();
constructor(host: UmbControllerHost) {
super(host, UMB_IS_TRASHED_CONTEXT);
super(host, UMB_ENTITY_IS_TRASHED_CONTEXT);
}
/**

View File

@@ -1,3 +1,3 @@
export { UmbIsTrashedContext } from './is-trashed.context.js';
export { UMB_IS_TRASHED_CONTEXT } from './is-trashed.context-token.js';
export { UmbEntityIsTrashedContext as UmbIsTrashedContext } from './entity-is-trashed.context.js';
export { UMB_ENTITY_IS_TRASHED_CONTEXT as UMB_IS_TRASHED_CONTEXT } from './entity-is-trashed.context-token.js';
export type { IUmbIsTrashedContext } from './types.js';

View File

@@ -1,4 +0,0 @@
import type { UmbIsTrashedContext } from './is-trashed.context.js';
import { UmbContextToken } from '@umbraco-cms/backoffice/context-api';
export const UMB_IS_TRASHED_CONTEXT = new UmbContextToken<UmbIsTrashedContext>('UmbIsTrashedContext');