add alias consts

This commit is contained in:
Mads Rasmussen
2024-05-01 07:35:29 +02:00
parent 5cee10258e
commit cb37e42dc0
7 changed files with 12 additions and 6 deletions

View File

@@ -0,0 +1 @@
export const UMB_IS_NOT_TRASHED_CONDITION_ALIAS = 'Umb.Condition.IsNotTrashed';

View File

@@ -1,8 +1,9 @@
import { UMB_IS_NOT_TRASHED_CONDITION_ALIAS } from './constants.js';
import type { ManifestCondition } from '@umbraco-cms/backoffice/extension-api';
export const manifest: ManifestCondition = {
type: 'condition',
name: 'Is not trashed Condition',
alias: 'Umb.Condition.IsNotTrashed',
alias: UMB_IS_NOT_TRASHED_CONDITION_ALIAS,
api: () => import('./is-not-trashed.condition.js'),
};

View File

@@ -0,0 +1 @@
export const UMB_IS_TRASHED_CONDITION_ALIAS = 'Umb.Condition.IsTrashed';

View File

@@ -1,8 +1,9 @@
import { UMB_IS_TRASHED_CONDITION_ALIAS } from './constants.js';
import type { ManifestCondition } from '@umbraco-cms/backoffice/extension-api';
export const manifest: ManifestCondition = {
type: 'condition',
name: 'Is trashed Condition',
alias: 'Umb.Condition.IsTrashed',
alias: UMB_IS_TRASHED_CONDITION_ALIAS,
api: () => import('./is-trashed.condition.js'),
};

View File

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

View File

@@ -1,5 +1,4 @@
import { UMB_IS_TRASHED_CONTEXT } from './is-trashed.context-token.js';
import type { IUmbIsTrashedContext } from './types.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';
@@ -11,7 +10,7 @@ import { UmbBooleanState } from '@umbraco-cms/backoffice/observable-api';
* @extends {UmbContextBase<UmbIsTrashedContext>}
* @implements {UmbIsTrashedContext}
*/
export class UmbIsTrashedContext extends UmbContextBase<IUmbIsTrashedContext> implements IUmbIsTrashedContext {
export class UmbIsTrashedContext extends UmbContextBase<UmbIsTrashedContext> {
#isTrashed = new UmbBooleanState(false);
isTrashed = this.#isTrashed.asObservable();

View File

@@ -15,3 +15,6 @@ export type {
export type { IUmbIsTrashedContext } from './contexts/is-trashed/index.js';
export { UmbIsTrashedContext, UMB_IS_TRASHED_CONTEXT } from './contexts/is-trashed/index.js';
export { UMB_IS_NOT_TRASHED_CONDITION_ALIAS } from './conditions/is-not-trashed/constants.js';
export { UMB_IS_TRASHED_CONDITION_ALIAS } from './conditions/is-trashed/constants.js';