-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2389 from umbraco/v15/feature/emm-entity-actions
Extension Manifest Map: Entity Actions
- Loading branch information
Showing
48 changed files
with
327 additions
and
248 deletions.
There are no files selected for viewing
3 changes: 1 addition & 2 deletions
3
src/packages/core/components/entity-actions-bundle/entity-actions-bundle.element.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
src/packages/core/entity-action/common/delete/delete.action.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import type { MetaEntityActionDefaultKind } from '../../default/index.js'; | ||
import type { ManifestEntityAction } from '../../entity-action.extension.js'; | ||
|
||
export interface ManifestEntityActionDeleteKind extends ManifestEntityAction<MetaEntityActionDeleteKind> { | ||
type: 'entityAction'; | ||
kind: 'delete'; | ||
} | ||
|
||
export interface MetaEntityActionDeleteKind extends MetaEntityActionDefaultKind { | ||
detailRepositoryAlias: string; | ||
itemRepositoryAlias: string; | ||
} | ||
|
||
declare global { | ||
interface UmbExtensionManifestMap { | ||
umbDeleteEntityActionKind: ManifestEntityActionDeleteKind; | ||
} | ||
} |
3 changes: 1 addition & 2 deletions
3
src/packages/core/entity-action/common/duplicate/duplicate.action.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
src/packages/core/entity-action/default/entity-action.element.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './types.js'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import type { ManifestEntityAction, MetaEntityAction } from '../entity-action.extension.js'; | ||
|
||
export interface ManifestEntityActionDefaultKind extends ManifestEntityAction<MetaEntityActionDefaultKind> { | ||
type: 'entityAction'; | ||
kind: 'default'; | ||
} | ||
|
||
export interface MetaEntityActionDefaultKind extends MetaEntityAction { | ||
/** | ||
* An icon to represent the action to be performed | ||
* @examples [ | ||
* "icon-box", | ||
* "icon-grid" | ||
* ] | ||
*/ | ||
icon: string; | ||
|
||
/** | ||
* The friendly name of the action to perform | ||
* @examples [ | ||
* "Create", | ||
* "Create Content Template" | ||
* ] | ||
*/ | ||
label: string; | ||
|
||
/** | ||
* The action requires additional input from the user. | ||
* A dialog will prompt the user for more information or to make a choice. | ||
* @type {boolean} | ||
* @memberof MetaEntityActionDefaultKind | ||
*/ | ||
additionalOptions?: boolean; | ||
} | ||
|
||
declare global { | ||
interface UmbExtensionManifestMap { | ||
umbDefaultEntityActionKind: ManifestEntityActionDefaultKind; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
src/packages/core/entity-action/entity-action.extension.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import type { ManifestElementAndApi, ManifestWithDynamicConditions } from '@umbraco-cms/backoffice/extension-api'; | ||
import type { UmbEntityAction, UmbEntityActionElement } from '@umbraco-cms/backoffice/entity-action'; | ||
|
||
/** | ||
* An action to perform on an entity | ||
* For example for content you may wish to create a new document etc | ||
*/ | ||
export interface ManifestEntityAction<MetaType extends MetaEntityAction = MetaEntityAction> | ||
extends ManifestElementAndApi<UmbEntityActionElement, UmbEntityAction<MetaType>>, | ||
ManifestWithDynamicConditions<UmbExtensionCondition> { | ||
type: 'entityAction'; | ||
forEntityTypes: Array<string>; | ||
meta: MetaType; | ||
} | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-empty-object-type | ||
export interface MetaEntityAction {} | ||
|
||
declare global { | ||
interface UmbExtensionManifestMap { | ||
umbEntityAction: ManifestEntityAction; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
205 changes: 0 additions & 205 deletions
205
src/packages/core/extension-registry/extensions/entity-action.extension.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 3 additions & 6 deletions
9
src/packages/core/recycle-bin/entity-action/empty-recycle-bin/empty-recycle-bin.action.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
src/packages/core/recycle-bin/entity-action/empty-recycle-bin/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from './types.js'; | ||
export * from './empty-recycle-bin.action.js'; |
Oops, something went wrong.