Skip to content

Commit 53715cf

Browse files
committed
split kinds
1 parent d4a0e8b commit 53715cf

File tree

3 files changed

+58
-57
lines changed

3 files changed

+58
-57
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import type { ManifestEntityAction, MetaEntityActionDefaultKind } from '../../entity-action.extension.js';
2+
3+
export interface ManifestEntityActionDeleteKind extends ManifestEntityAction<MetaEntityActionDeleteKind> {
4+
type: 'entityAction';
5+
kind: 'delete';
6+
}
7+
8+
export interface MetaEntityActionDeleteKind extends MetaEntityActionDefaultKind {
9+
detailRepositoryAlias: string;
10+
itemRepositoryAlias: string;
11+
}
12+
13+
declare global {
14+
interface UmbExtensionManifestMap {
15+
umbDeleteEntityActionKind: ManifestEntityActionDeleteKind;
16+
}
17+
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import type { ManifestEntityAction, MetaEntityAction } from '../entity-action.extension.js';
2+
3+
export interface ManifestEntityActionDefaultKind extends ManifestEntityAction<MetaEntityActionDefaultKind> {
4+
type: 'entityAction';
5+
kind: 'default';
6+
}
7+
8+
export interface MetaEntityActionDefaultKind extends MetaEntityAction {
9+
/**
10+
* An icon to represent the action to be performed
11+
* @examples [
12+
* "icon-box",
13+
* "icon-grid"
14+
* ]
15+
*/
16+
icon: string;
17+
18+
/**
19+
* The friendly name of the action to perform
20+
* @examples [
21+
* "Create",
22+
* "Create Content Template"
23+
* ]
24+
*/
25+
label: string;
26+
27+
/**
28+
* The action requires additional input from the user.
29+
* A dialog will prompt the user for more information or to make a choice.
30+
* @type {boolean}
31+
* @memberof MetaEntityActionDefaultKind
32+
*/
33+
additionalOptions?: boolean;
34+
}
35+
36+
declare global {
37+
interface UmbExtensionManifestMap {
38+
umbDefaultEntityActionKind: ManifestEntityActionDefaultKind;
39+
}
40+
}
Lines changed: 1 addition & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import type { ManifestElementAndApi, ManifestWithDynamicConditions } from '@umbraco-cms/backoffice/extension-api';
22
import type { UmbEntityAction, UmbEntityActionElement } from '@umbraco-cms/backoffice/entity-action';
3-
import type { UmbModalToken, UmbPickerModalData, UmbPickerModalValue } from '@umbraco-cms/backoffice/modal';
43

54
/**
65
* An action to perform on an entity
@@ -17,63 +16,8 @@ export interface ManifestEntityAction<MetaType extends MetaEntityAction = MetaEn
1716
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
1817
export interface MetaEntityAction {}
1918

20-
export interface ManifestEntityActionDefaultKind extends ManifestEntityAction<MetaEntityActionDefaultKind> {
21-
type: 'entityAction';
22-
kind: 'default';
23-
}
24-
25-
export interface MetaEntityActionDefaultKind extends MetaEntityAction {
26-
/**
27-
* An icon to represent the action to be performed
28-
* @examples [
29-
* "icon-box",
30-
* "icon-grid"
31-
* ]
32-
*/
33-
icon: string;
34-
35-
/**
36-
* The friendly name of the action to perform
37-
* @examples [
38-
* "Create",
39-
* "Create Content Template"
40-
* ]
41-
*/
42-
label: string;
43-
44-
/**
45-
* The action requires additional input from the user.
46-
* A dialog will prompt the user for more information or to make a choice.
47-
* @type {boolean}
48-
* @memberof MetaEntityActionDefaultKind
49-
*/
50-
additionalOptions?: boolean;
51-
}
52-
53-
// DELETE
54-
export interface ManifestEntityActionDeleteKind extends ManifestEntityAction<MetaEntityActionDeleteKind> {
55-
type: 'entityAction';
56-
kind: 'delete';
57-
}
58-
59-
export interface MetaEntityActionDeleteKind extends MetaEntityActionDefaultKind {
60-
detailRepositoryAlias: string;
61-
itemRepositoryAlias: string;
62-
}
63-
64-
export type UmbEntityActionExtensions =
65-
| ManifestEntityAction
66-
| ManifestEntityActionDefaultKind
67-
| ManifestEntityActionDeleteKind
68-
| ManifestEntityActionTrashKind;
69-
70-
/**
71-
* @deprecated use `UmbEntityActionExtensions` instead.
72-
*/
73-
export type ManifestEntityActions = UmbEntityActionExtensions;
74-
7519
declare global {
7620
interface UmbExtensionManifestMap {
77-
UmbEntityActionExtensions: UmbEntityActionExtensions;
21+
umbEntityAction: ManifestEntityAction;
7822
}
7923
}

0 commit comments

Comments
 (0)