UMB_PUBLISHABLE_WORKSPACE_CONTEXT

This commit is contained in:
Niels Lyngsø
2024-01-05 15:50:45 +01:00
parent e5526ba9c5
commit a38d27aa7d
2 changed files with 18 additions and 3 deletions

View File

@@ -1,12 +1,13 @@
export * from './workspace-property-dataset/index.js';
export * from './publishable-workspace.context-token.js';
export * from './workspace-action-menu/index.js';
export * from './workspace-action/index.js';
export type { WorkspaceAliasConditionConfig } from './workspace-alias.condition.js';
export type { WorkspaceEntityTypeConditionConfig } from './workspace-entity-type.condition.js';
export * from './workspace-context/index.js';
export * from './workspace-editor/index.js';
export * from './workspace-footer/index.js';
export * from './workspace-is-new-redirect-controller/index.js';
export * from './workspace-modal/index.js';
export * from './workspace-property-dataset/index.js';
export * from './workspace-split-view-manager.class.js';
export * from './workspace-split-view/index.js';
export type { WorkspaceAliasConditionConfig } from './workspace-alias.condition.js';
export type { WorkspaceEntityTypeConditionConfig } from './workspace-entity-type.condition.js';

View File

@@ -0,0 +1,14 @@
import { UmbContextToken } from '@umbraco-cms/backoffice/context-api';
import {
UmbPublishableWorkspaceContextInterface,
UmbSaveableWorkspaceContextInterface,
} from '@umbraco-cms/backoffice/workspace';
export const UMB_PUBLISHABLE_WORKSPACE_CONTEXT = new UmbContextToken<
UmbSaveableWorkspaceContextInterface,
UmbPublishableWorkspaceContextInterface
>(
'UmbWorkspaceContext',
undefined,
(context): context is UmbPublishableWorkspaceContextInterface => (context as any).publish !== undefined,
);