declare type and constant (#19091)
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import { UMB_WORKSPACE_CONTENT_TYPE_ALIAS_CONDITION_ALIAS } from '@umbraco-cms/backoffice/content-type';
|
||||
|
||||
const workspace: UmbExtensionManifest = {
|
||||
type: 'workspaceView',
|
||||
alias: 'Example.WorkspaceView.EntityContentTypeCondition',
|
||||
@@ -10,7 +12,7 @@ const workspace: UmbExtensionManifest = {
|
||||
},
|
||||
conditions: [
|
||||
{
|
||||
alias: 'Umb.Condition.WorkspaceContentTypeAlias',
|
||||
alias: UMB_WORKSPACE_CONTENT_TYPE_ALIAS_CONDITION_ALIAS,
|
||||
//match : 'blogPost'
|
||||
oneOf: ['blogPost', 'mediaType1'],
|
||||
},
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
/**
|
||||
* Workspace Content Type Alias condition alias
|
||||
*/
|
||||
export const UMB_WORKSPACE_CONTENT_TYPE_ALIAS_CONDITION_ALIAS = 'Umb.Condition.WorkspaceContentTypeAlias';
|
||||
@@ -1,20 +1,22 @@
|
||||
import type { UMB_WORKSPACE_CONTENT_TYPE_ALIAS_CONDITION_ALIAS } from './constants.js';
|
||||
import type { UmbConditionConfigBase } from '@umbraco-cms/backoffice/extension-api';
|
||||
|
||||
export type UmbWorkspaceContentTypeAliasConditionConfig =
|
||||
UmbConditionConfigBase<'Umb.Condition.WorkspaceContentTypeAlias'> & {
|
||||
/**
|
||||
* Define a content type alias in which workspace this extension should be available
|
||||
* @example
|
||||
* Depends on implementation, but i.e. "article", "image", "blockPage"
|
||||
*/
|
||||
match?: string;
|
||||
/**
|
||||
* Define one or more content type aliases in which workspace this extension should be available
|
||||
* @example
|
||||
* ["article", "image", "blockPage"]
|
||||
*/
|
||||
oneOf?: Array<string>;
|
||||
};
|
||||
export type UmbWorkspaceContentTypeAliasConditionConfig = UmbConditionConfigBase<
|
||||
typeof UMB_WORKSPACE_CONTENT_TYPE_ALIAS_CONDITION_ALIAS
|
||||
> & {
|
||||
/**
|
||||
* Define a content type alias in which workspace this extension should be available
|
||||
* @example
|
||||
* Depends on implementation, but i.e. "article", "image", "blockPage"
|
||||
*/
|
||||
match?: string;
|
||||
/**
|
||||
* Define one or more content type aliases in which workspace this extension should be available
|
||||
* @example
|
||||
* ["article", "image", "blockPage"]
|
||||
*/
|
||||
oneOf?: Array<string>;
|
||||
};
|
||||
/**
|
||||
* @deprecated Use `UmbWorkspaceContentTypeAliasConditionConfig` instead. This will be removed in Umbraco 17.
|
||||
*/
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
export * from './modals/constants.js';
|
||||
export * from './workspace/constants.js';
|
||||
export * from './conditions/constants.js';
|
||||
|
||||
@@ -2,6 +2,7 @@ import type { CompositionTypeModel } from '@umbraco-cms/backoffice/external/back
|
||||
import type { UmbReferenceByUnique } from '@umbraco-cms/backoffice/models';
|
||||
|
||||
export type * from './composition/types.js';
|
||||
export type * from './conditions/types.js';
|
||||
|
||||
export type UmbPropertyContainerTypes = 'Group' | 'Tab';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user