From 5d2d757708273fb9e3534ad7115ca86e85848ba1 Mon Sep 17 00:00:00 2001 From: Mads Rasmussen Date: Mon, 27 Feb 2023 16:01:04 +0100 Subject: [PATCH] move default actions to lib folder --- .../entity-action/actions}/copy/copy.action.ts | 0 .../entity-action/actions}/delete/delete.action.ts | 0 .../libs/entity-action/actions/index.ts | 5 +++++ .../entity-action/actions}/move/move.action.ts | 0 .../sort-children-of/sort-children-of.action.ts | 0 .../entity-action/actions}/trash/trash.action.ts | 0 src/Umbraco.Web.UI.Client/libs/entity-action/index.ts | 1 + .../documents/documents/entity-actions/manifests.ts | 10 ++++++---- .../media/media-types/entity-actions/manifests.ts | 6 ++---- .../backoffice/media/media/entity-actions/manifests.ts | 2 +- .../members/member-groups/entity-actions/manifests.ts | 2 +- .../members/member-types/entity-actions/manifests.ts | 2 +- .../members/members/entity-actions/manifests.ts | 2 +- .../settings/languages/entity-actions/manifests.ts | 2 +- .../templating/templates/entity-actions/manifests.ts | 2 +- .../translation/dictionary/entity-actions/manifests.ts | 3 +-- 16 files changed, 21 insertions(+), 16 deletions(-) rename src/Umbraco.Web.UI.Client/{src/backoffice/shared/entity-actions => libs/entity-action/actions}/copy/copy.action.ts (100%) rename src/Umbraco.Web.UI.Client/{src/backoffice/shared/entity-actions => libs/entity-action/actions}/delete/delete.action.ts (100%) create mode 100644 src/Umbraco.Web.UI.Client/libs/entity-action/actions/index.ts rename src/Umbraco.Web.UI.Client/{src/backoffice/shared/entity-actions => libs/entity-action/actions}/move/move.action.ts (100%) rename src/Umbraco.Web.UI.Client/{src/backoffice/shared/entity-actions => libs/entity-action/actions}/sort-children-of/sort-children-of.action.ts (100%) rename src/Umbraco.Web.UI.Client/{src/backoffice/shared/entity-actions => libs/entity-action/actions}/trash/trash.action.ts (100%) diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/shared/entity-actions/copy/copy.action.ts b/src/Umbraco.Web.UI.Client/libs/entity-action/actions/copy/copy.action.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/backoffice/shared/entity-actions/copy/copy.action.ts rename to src/Umbraco.Web.UI.Client/libs/entity-action/actions/copy/copy.action.ts diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/shared/entity-actions/delete/delete.action.ts b/src/Umbraco.Web.UI.Client/libs/entity-action/actions/delete/delete.action.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/backoffice/shared/entity-actions/delete/delete.action.ts rename to src/Umbraco.Web.UI.Client/libs/entity-action/actions/delete/delete.action.ts diff --git a/src/Umbraco.Web.UI.Client/libs/entity-action/actions/index.ts b/src/Umbraco.Web.UI.Client/libs/entity-action/actions/index.ts new file mode 100644 index 0000000000..b8fa3d3206 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/libs/entity-action/actions/index.ts @@ -0,0 +1,5 @@ +export * from './copy/copy.action'; +export * from './delete/delete.action'; +export * from './move/move.action'; +export * from './sort-children-of/sort-children-of.action'; +export * from './trash/trash.action'; diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/shared/entity-actions/move/move.action.ts b/src/Umbraco.Web.UI.Client/libs/entity-action/actions/move/move.action.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/backoffice/shared/entity-actions/move/move.action.ts rename to src/Umbraco.Web.UI.Client/libs/entity-action/actions/move/move.action.ts diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/shared/entity-actions/sort-children-of/sort-children-of.action.ts b/src/Umbraco.Web.UI.Client/libs/entity-action/actions/sort-children-of/sort-children-of.action.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/backoffice/shared/entity-actions/sort-children-of/sort-children-of.action.ts rename to src/Umbraco.Web.UI.Client/libs/entity-action/actions/sort-children-of/sort-children-of.action.ts diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/shared/entity-actions/trash/trash.action.ts b/src/Umbraco.Web.UI.Client/libs/entity-action/actions/trash/trash.action.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/backoffice/shared/entity-actions/trash/trash.action.ts rename to src/Umbraco.Web.UI.Client/libs/entity-action/actions/trash/trash.action.ts diff --git a/src/Umbraco.Web.UI.Client/libs/entity-action/index.ts b/src/Umbraco.Web.UI.Client/libs/entity-action/index.ts index 56f0bb40f5..9503bc670b 100644 --- a/src/Umbraco.Web.UI.Client/libs/entity-action/index.ts +++ b/src/Umbraco.Web.UI.Client/libs/entity-action/index.ts @@ -1,3 +1,4 @@ export * from './action'; export * from './entity-action'; export * from './entity-bulk-action'; +export * from './actions'; diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/documents/documents/entity-actions/manifests.ts b/src/Umbraco.Web.UI.Client/src/backoffice/documents/documents/entity-actions/manifests.ts index cbe3767e0d..fe90e1a223 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/documents/documents/entity-actions/manifests.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/documents/documents/entity-actions/manifests.ts @@ -1,7 +1,9 @@ -import { UmbCopyEntityAction } from '../../../shared/entity-actions/copy/copy.action'; -import { UmbMoveEntityAction } from '../../../shared/entity-actions/move/move.action'; -import { UmbTrashEntityAction } from '../../../shared/entity-actions/trash/trash.action'; -import { UmbSortChildrenOfEntityAction } from '../../../shared/entity-actions/sort-children-of/sort-children-of.action'; +import { + UmbCopyEntityAction, + UmbMoveEntityAction, + UmbTrashEntityAction, + UmbSortChildrenOfEntityAction, +} from '@umbraco-cms/entity-action'; import { UmbCreateDocumentEntityAction } from './create.action'; import { UmbPublishDocumentEntityAction } from './publish.action'; import { UmbDocumentCultureAndHostnamesEntityAction } from './culture-and-hostnames.action'; diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/media/media-types/entity-actions/manifests.ts b/src/Umbraco.Web.UI.Client/src/backoffice/media/media-types/entity-actions/manifests.ts index 32332fbc1b..184035db8b 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/media/media-types/entity-actions/manifests.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/media/media-types/entity-actions/manifests.ts @@ -1,7 +1,5 @@ -import { UmbDeleteEntityAction } from '../../../../backoffice/shared/entity-actions/delete/delete.action'; -import { UmbMoveEntityAction } from '../../../../backoffice/shared/entity-actions/move/move.action'; +import { UmbDeleteEntityAction, UmbMoveEntityAction, UmbCopyEntityAction } from '@umbraco-cms/entity-action'; import { MEDIA_TYPE_REPOSITORY_ALIAS } from '../repository/manifests'; -import { UmbCopyEntityAction } from '../../../../backoffice/shared/entity-actions/copy/copy.action'; import { UmbCreateMediaTypeEntityAction } from './create.action'; import UmbReloadMediaTypeEntityAction from './reload.action'; import type { ManifestEntityAction } from '@umbraco-cms/models'; @@ -62,7 +60,7 @@ const entityActions: Array = [ api: UmbDeleteEntityAction, }, }, - { + { type: 'entityAction', alias: 'Umb.EntityAction.MediaType.Reload', name: 'Reload Media Type Entity Action', diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/media/media/entity-actions/manifests.ts b/src/Umbraco.Web.UI.Client/src/backoffice/media/media/entity-actions/manifests.ts index edab42e14f..07c8ca11f8 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/media/media/entity-actions/manifests.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/media/media/entity-actions/manifests.ts @@ -1,4 +1,4 @@ -import { UmbTrashEntityAction } from '../../../shared/entity-actions/trash/trash.action'; +import { UmbTrashEntityAction } from '@umbraco-cms/entity-action'; import { ManifestEntityAction } from 'libs/extensions-registry/entity-action.models'; const entityActions: Array = [ diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/members/member-groups/entity-actions/manifests.ts b/src/Umbraco.Web.UI.Client/src/backoffice/members/member-groups/entity-actions/manifests.ts index 6b010cf284..5e84d8d6db 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/members/member-groups/entity-actions/manifests.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/members/member-groups/entity-actions/manifests.ts @@ -1,4 +1,4 @@ -import { UmbDeleteEntityAction } from '../../../shared/entity-actions/delete/delete.action'; +import { UmbDeleteEntityAction } from '@umbraco-cms/entity-action'; import { ManifestEntityAction } from 'libs/extensions-registry/entity-action.models'; const entityActions: Array = [ diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/members/member-types/entity-actions/manifests.ts b/src/Umbraco.Web.UI.Client/src/backoffice/members/member-types/entity-actions/manifests.ts index 1926cca973..9974310ea0 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/members/member-types/entity-actions/manifests.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/members/member-types/entity-actions/manifests.ts @@ -1,4 +1,4 @@ -import { UmbDeleteEntityAction } from '../../../../backoffice/shared/entity-actions/delete/delete.action'; +import { UmbDeleteEntityAction } from '@umbraco-cms/entity-action'; import { MEMBER_TYPES_REPOSITORY_ALIAS } from '../repository/manifests'; import type { ManifestEntityAction } from '@umbraco-cms/models'; diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/members/members/entity-actions/manifests.ts b/src/Umbraco.Web.UI.Client/src/backoffice/members/members/entity-actions/manifests.ts index 679b387dbf..6f040a256b 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/members/members/entity-actions/manifests.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/members/members/entity-actions/manifests.ts @@ -1,4 +1,4 @@ -import { UmbDeleteEntityAction } from '../../../shared/entity-actions/delete/delete.action'; +import { UmbDeleteEntityAction } from '@umbraco-cms/entity-action'; import { ManifestEntityAction } from 'libs/extensions-registry/entity-action.models'; const entityActions: Array = [ diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/settings/languages/entity-actions/manifests.ts b/src/Umbraco.Web.UI.Client/src/backoffice/settings/languages/entity-actions/manifests.ts index 84b57075b0..e8846b75a6 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/settings/languages/entity-actions/manifests.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/settings/languages/entity-actions/manifests.ts @@ -1,4 +1,4 @@ -import { UmbDeleteEntityAction } from '../../../shared/entity-actions/delete/delete.action'; +import { UmbDeleteEntityAction } from '@umbraco-cms/entity-action'; import { ManifestEntityAction } from '@umbraco-cms/extensions-registry'; const entityType = 'language'; diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/templating/templates/entity-actions/manifests.ts b/src/Umbraco.Web.UI.Client/src/backoffice/templating/templates/entity-actions/manifests.ts index 35518ab257..513d490bd4 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/templating/templates/entity-actions/manifests.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/templating/templates/entity-actions/manifests.ts @@ -1,4 +1,4 @@ -import { UmbDeleteEntityAction } from '../../../shared/entity-actions/delete/delete.action'; +import { UmbDeleteEntityAction } from '@umbraco-cms/entity-action'; import { UmbCreateEntityAction } from './create/create.action'; import { ManifestEntityAction } from 'libs/extensions-registry/entity-action.models'; diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/translation/dictionary/entity-actions/manifests.ts b/src/Umbraco.Web.UI.Client/src/backoffice/translation/dictionary/entity-actions/manifests.ts index b83f66480b..fb6e0f716a 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/translation/dictionary/entity-actions/manifests.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/translation/dictionary/entity-actions/manifests.ts @@ -1,5 +1,4 @@ -import { UmbDeleteEntityAction } from '../../../../backoffice/shared/entity-actions/delete/delete.action'; -import { UmbMoveEntityAction } from '../../../../backoffice/shared/entity-actions/move/move.action'; +import { UmbDeleteEntityAction, UmbMoveEntityAction } from '@umbraco-cms/entity-action'; import { DICTIONARY_REPOSITORY_ALIAS } from '../repository/manifests'; import UmbReloadDictionaryEntityAction from './reload.action'; import UmbImportDictionaryEntityAction from './import/import.action';