Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions src/Umbraco.Web.UI.Client/src/assets/lang/en-us.ts
Original file line number Diff line number Diff line change
Expand Up @@ -445,10 +445,9 @@ export default {
compositionDescription:
"Defines a re-usable set of properties that can be included in the definition of\n multiple other Document Types. For example, a set of 'Common Page Settings'.\n ",
folder: 'Folder',
folderDescription:
'Used to organise the Document Types, Compositions and Element Types created in this\n Document Type tree.\n ',
newFolder: 'New folder',
newDataType: 'New Data Type',
folderDescription: 'Used to organize items and other folders. Keep items structured and easy to access.',
newFolder: 'Folder',
newDataType: 'Data Type',
newJavascriptFile: 'New JavaScript file',
newEmptyPartialView: 'New empty partial view',
newPartialViewMacro: 'New partial view macro',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { UmbRefItemElement } from '@umbraco-cms/backoffice/components';
import type {
UmbEntityCreateOptionActionListModalData,
UmbEntityCreateOptionActionListModalValue,
} from './entity-create-option-action-list-modal.token.js';
import { UmbRefItemElement } from '@umbraco-cms/backoffice/components';
import type { ManifestEntityCreateOptionAction } from '@umbraco-cms/backoffice/entity-create-option-action';
import type { UmbExtensionApiInitializer } from '@umbraco-cms/backoffice/extension-api';
import { UmbExtensionsApiInitializer } from '@umbraco-cms/backoffice/extension-api';
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import type { MetaEntityCreateOptionActionFolderKind } from './types.js';
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
import { UmbCreateFolderEntityAction } from '@umbraco-cms/backoffice/tree';
import type { UmbEntityCreateOptionActionArgs } from '@umbraco-cms/backoffice/entity-create-option-action';

export class UmbFolderCreateOptionAction extends UmbCreateFolderEntityAction {
constructor(host: UmbControllerHost, args: UmbEntityCreateOptionActionArgs<MetaEntityCreateOptionActionFolderKind>) {
super(host, { ...args, meta: { ...args.meta } });
}
}

export { UmbFolderCreateOptionAction as api };
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import type { UmbExtensionManifestKind } from '@umbraco-cms/backoffice/extension-registry';

export const manifests: Array<UmbExtensionManifest | UmbExtensionManifestKind> = [
{
type: 'kind',
alias: 'Umb.Kind.EntityCreateOptionAction.Folder.Create',
matchKind: 'folder',
matchType: 'entityCreateOptionAction',
manifest: {
type: 'entityCreateOptionAction',
kind: 'folder',
api: () => import('./folder-entity-create-option-action.js'),
weight: 1,
forEntityTypes: [],
meta: {
icon: 'icon-folder',
label: '#create_folder',
description: '#create_folderDescription',
},
},
},
];
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import type {
ManifestEntityCreateOptionAction,
MetaEntityCreateOptionAction,
} from '@umbraco-cms/backoffice/entity-create-option-action';

export interface ManifestEntityCreateOptionActionFolderKind
extends ManifestEntityCreateOptionAction<MetaEntityCreateOptionActionFolderKind> {
type: 'entityCreateOptionAction';
kind: 'folder';
}

export interface MetaEntityCreateOptionActionFolderKind extends MetaEntityCreateOptionAction {
folderRepositoryAlias: string;
}

declare global {
interface UmbExtensionManifestMap {
umbManifestEntityCreateOptionActionFolderKind: ManifestEntityCreateOptionActionFolderKind;
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { manifests as modalManifests } from './modal/manifests.js';
import { manifests as entityActionManifests } from './entity-action/manifests.js';
import { manifests as entityCreateOptionActionManifests } from './entity-create-option-action/manifests.js';
import { manifests as modalManifests } from './modal/manifests.js';
import type { UmbExtensionManifestKind } from '@umbraco-cms/backoffice/extension-registry';

export const manifests: Array<UmbExtensionManifest | UmbExtensionManifestKind> = [
...modalManifests,
...entityActionManifests,
...entityCreateOptionActionManifests,
...modalManifests,
];

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { UMB_CREATE_DATA_TYPE_WORKSPACE_PATH_PATTERN } from '../../../paths.js';
import type { UmbDataTypeFolderEntityType, UmbDataTypeRootEntityType } from '../../../entity.js';
import { UmbEntityCreateOptionActionBase } from '@umbraco-cms/backoffice/entity-create-option-action';
import type { MetaEntityCreateOptionAction } from '@umbraco-cms/backoffice/entity-create-option-action';

export class UmbDefaultDataTypeCreateOptionAction extends UmbEntityCreateOptionActionBase<MetaEntityCreateOptionAction> {
override async getHref() {
const parentEntityType = this.args.entityType as UmbDataTypeRootEntityType | UmbDataTypeFolderEntityType;
if (!parentEntityType) throw new Error('Entity type is required to create a document type');

const parentUnique = this.args.unique ?? null;

return UMB_CREATE_DATA_TYPE_WORKSPACE_PATH_PATTERN.generateAbsolute({
parentEntityType,
parentUnique,
});
}
}

export { UmbDefaultDataTypeCreateOptionAction as api };
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { UMB_DATA_TYPE_FOLDER_ENTITY_TYPE, UMB_DATA_TYPE_ROOT_ENTITY_TYPE } from '../../../entity.js';
import type { UmbExtensionManifestKind } from '@umbraco-cms/backoffice/extension-registry';

export const manifests: Array<UmbExtensionManifest | UmbExtensionManifestKind> = [
{
type: 'entityCreateOptionAction',
alias: 'Umb.EntityCreateOptionAction.DataType.Default',
name: 'Default Data Type Entity Create Option Action',
weight: 1000,
api: () => import('./default-data-type-create-option-action.js'),
forEntityTypes: [UMB_DATA_TYPE_ROOT_ENTITY_TYPE, UMB_DATA_TYPE_FOLDER_ENTITY_TYPE],
meta: {
icon: 'icon-autofill',
label: '#create_newDataType',
},
},
];
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { UMB_DATA_TYPE_FOLDER_ENTITY_TYPE, UMB_DATA_TYPE_ROOT_ENTITY_TYPE } from '../../../entity.js';
import { UMB_DATA_TYPE_FOLDER_REPOSITORY_ALIAS } from '../../../tree/constants.js';
import type { UmbExtensionManifestKind } from '@umbraco-cms/backoffice/extension-registry';

export const manifests: Array<UmbExtensionManifest | UmbExtensionManifestKind> = [
{
type: 'entityCreateOptionAction',
kind: 'folder',
alias: 'Umb.EntityCreateOptionAction.DataType.Folder',
name: 'Data Type Folder Entity Create Option Action',
forEntityTypes: [UMB_DATA_TYPE_ROOT_ENTITY_TYPE, UMB_DATA_TYPE_FOLDER_ENTITY_TYPE],
meta: {
icon: 'icon-folder',
label: '#create_folder',
description: '#create_folderDescription',
folderRepositoryAlias: UMB_DATA_TYPE_FOLDER_REPOSITORY_ALIAS,
},
},
];
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
import { UMB_DATA_TYPE_FOLDER_ENTITY_TYPE, UMB_DATA_TYPE_ROOT_ENTITY_TYPE } from '../../entity.js';
import { manifests as defaultManifests } from './default/manifests.js';
import { manifests as folderManifests } from './folder/manifests.js';
import type { UmbExtensionManifestKind } from '@umbraco-cms/backoffice/extension-registry';

export const manifests: Array<UmbExtensionManifest> = [
export const manifests: Array<UmbExtensionManifest | UmbExtensionManifestKind> = [
{
type: 'entityAction',
kind: 'default',
kind: 'create',
alias: 'Umb.EntityAction.DataType.Create',
name: 'Create Data Type Entity Action',
weight: 1200,
api: () => import('./create.action.js'),
forEntityTypes: [UMB_DATA_TYPE_ROOT_ENTITY_TYPE, UMB_DATA_TYPE_FOLDER_ENTITY_TYPE],
meta: {
icon: 'icon-add',
label: '#actions_create',
additionalOptions: true,
},
},
// TODO: Deprecated: Will be removed in 17.0.0
{
type: 'modal',
alias: 'Umb.Modal.DataTypeCreateOptions',
name: 'Data Type Create Options Modal',
element: () => import('./modal/data-type-create-options-modal.element.js'),
},
...defaultManifests,
...folderManifests,
];
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,29 @@ import type { UmbDataTypeCreateOptionsModalData } from './constants.js';
import { html, customElement } from '@umbraco-cms/backoffice/external/lit';
import { UmbModalBaseElement } from '@umbraco-cms/backoffice/modal';
import { UmbCreateFolderEntityAction } from '@umbraco-cms/backoffice/tree';
import { UmbDeprecation } from '@umbraco-cms/backoffice/utils';

/**
* @deprecated This element is deprecated and will be removed in v.17.0.0.
* Please use the UMB_ENTITY_CREATE_OPTION_ACTION_LIST_MODAL instead.
* @exports
* @class UmbDataTypeCreateOptionsModalElement
* @augments {UmbModalBaseElement<UmbDataTypeCreateOptionsModalData>}
*/
@customElement('umb-data-type-create-options-modal')
export class UmbDataTypeCreateOptionsModalElement extends UmbModalBaseElement<UmbDataTypeCreateOptionsModalData> {
#createFolderAction?: UmbCreateFolderEntityAction;

constructor() {
super();

new UmbDeprecation({
deprecated: 'umb-data-type-create-options-modal',
removeInVersion: '17.0.0',
solution: 'Use UMB_ENTITY_CREATE_OPTION_ACTION_LIST_MODAL instead',
}).warn();
}

override connectedCallback(): void {
super.connectedCallback();
if (!this.data?.parent) throw new Error('A parent is required to create a folder');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ import {
import { manifests as createManifests } from './create/manifests.js';
import { manifests as moveManifests } from './move-to/manifests.js';
import { manifests as duplicateManifests } from './duplicate/manifests.js';
import type { UmbExtensionManifestKind } from '@umbraco-cms/backoffice/extension-registry';

export const manifests: Array<UmbExtensionManifest> = [
export const manifests: Array<UmbExtensionManifest | UmbExtensionManifestKind> = [
{
type: 'entityAction',
kind: 'delete',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ import { manifests as repositoryManifests } from './repository/manifests.js';
import { manifests as searchProviderManifests } from './search/manifests.js';
import { manifests as treeManifests } from './tree/manifests.js';
import { manifests as workspaceManifests } from './workspace/manifests.js';
import type { UmbExtensionManifestKind } from '@umbraco-cms/backoffice/extension-registry';

export const manifests: Array<UmbExtensionManifest> = [
export const manifests: Array<UmbExtensionManifest | UmbExtensionManifestKind> = [
...collectionManifests,
...dataTypeRootManifest,
...entityActions,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { UMB_DATA_TYPE_TREE_ITEM_CHILDREN_COLLECTION_ALIAS } from '../constants.js';
import { UMB_COLLECTION_ALIAS_CONDITION } from '@umbraco-cms/backoffice/collection';

export const manifests: Array<UmbExtensionManifest> = [
{
type: 'collectionAction',
kind: 'create',
name: 'Data Type Tree Item Children Collection Create Action',
alias: 'Umb.CollectionAction.DataTypeTreeItemChildren.Create',
conditions: [
{
alias: UMB_COLLECTION_ALIAS_CONDITION,
match: UMB_DATA_TYPE_TREE_ITEM_CHILDREN_COLLECTION_ALIAS,
},
],
},
];
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { manifests as viewManifests } from './views/manifests.js';
import { manifests as repositoryManifests } from './repository/manifests.js';
import { manifests as actionManifests } from './action/manifests.js';
import { UMB_DATA_TYPE_TREE_ITEM_CHILDREN_COLLECTION_ALIAS } from './constants.js';
import { UMB_DATA_TYPE_TREE_ITEM_CHILDREN_COLLECTION_REPOSITORY_ALIAS } from './repository/index.js';

Expand All @@ -13,6 +14,7 @@ export const manifests: Array<UmbExtensionManifest> = [
repositoryAlias: UMB_DATA_TYPE_TREE_ITEM_CHILDREN_COLLECTION_REPOSITORY_ALIAS,
},
},
...actionManifests,
...viewManifests,
...repositoryManifests,
];

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { UMB_DOCUMENT_TYPE_ROOT_ENTITY_TYPE } from '../../../entity.js';
import {
UMB_DOCUMENT_TYPE_FOLDER_ENTITY_TYPE,
UMB_DOCUMENT_TYPE_FOLDER_REPOSITORY_ALIAS,
} from '../../../tree/constants.js';
import type { UmbExtensionManifestKind } from '@umbraco-cms/backoffice/extension-registry';

export const manifests: Array<UmbExtensionManifest | UmbExtensionManifestKind> = [
{
type: 'entityCreateOptionAction',
kind: 'folder',
alias: 'Umb.EntityCreateOptionAction.DocumentType.Folder',
name: 'Document Type Folder Entity Create Option Action',
forEntityTypes: [UMB_DOCUMENT_TYPE_ROOT_ENTITY_TYPE, UMB_DOCUMENT_TYPE_FOLDER_ENTITY_TYPE],
meta: {
icon: 'icon-folder',
label: '#create_folder',
description: '#create_folderDescription',
folderRepositoryAlias: UMB_DOCUMENT_TYPE_FOLDER_REPOSITORY_ALIAS,
},
},
];
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { UMB_DOCUMENT_TYPE_ENTITY_TYPE, UMB_DOCUMENT_TYPE_ROOT_ENTITY_TYPE } from '../../entity.js';
import { UMB_DOCUMENT_TYPE_FOLDER_ENTITY_TYPE } from '../../tree/index.js';
import { manifests as folderManifests } from './folder/manifests.js';
import type { UmbExtensionManifestKind } from '@umbraco-cms/backoffice/extension-registry';

export const manifests: Array<UmbExtensionManifest> = [
export const manifests: Array<UmbExtensionManifest | UmbExtensionManifestKind> = [
{
type: 'entityAction',
kind: 'create',
Expand Down Expand Up @@ -67,17 +69,5 @@ export const manifests: Array<UmbExtensionManifest> = [
description: '#create_elementTypeDescription',
},
},
{
type: 'entityCreateOptionAction',
alias: 'Umb.EntityCreateOptionAction.DocumentType.Folder',
name: 'Folder Document Type Entity Create Option Action',
weight: 70,
api: () => import('./folder/document-type-folder-create-option-action.js'),
forEntityTypes: [UMB_DOCUMENT_TYPE_ROOT_ENTITY_TYPE, UMB_DOCUMENT_TYPE_FOLDER_ENTITY_TYPE],
meta: {
icon: 'icon-folder',
label: '#create_folder',
description: '#create_folderDescription',
},
},
...folderManifests,
];
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ import { manifests as moveManifests } from './move-to/manifests.js';
import { manifests as duplicateManifests } from './duplicate/manifests.js';
import { manifests as exportManifests } from './export/manifests.js';
import { manifests as importManifests } from './import/manifests.js';
import type { UmbExtensionManifestKind } from '@umbraco-cms/backoffice/extension-registry';

export const manifests: Array<UmbExtensionManifest> = [
export const manifests: Array<UmbExtensionManifest | UmbExtensionManifestKind> = [
{
type: 'entityAction',
kind: 'delete',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ import { manifests as repositoryManifests } from './repository/manifests.js';
import { manifests as searchManifests } from './search/manifests.js';
import { manifests as treeManifests } from './tree/manifests.js';
import { manifests as workspaceManifests } from './workspace/manifests.js';
import type { UmbExtensionManifestKind } from '@umbraco-cms/backoffice/extension-registry';

export const manifests: Array<UmbExtensionManifest> = [
export const manifests: Array<UmbExtensionManifest | UmbExtensionManifestKind> = [
...entityActionsManifests,
...menuManifests,
...propertyEditorManifests,
Expand Down
Loading