@umbraco-cms/backoffice 1.0.0-next.37dcc47c → 1.0.0-next.386e13e7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/data-type.d.ts ADDED
@@ -0,0 +1,13 @@
1
+ import { DataTypePropertyPresentationModel } from '@umbraco-cms/backoffice/backend-api';
2
+
3
+ /**
4
+ * Extends Array to add utility functions for accessing data type properties
5
+ * by alias, returning either the value or the complete DataTypePropertyPresentationModel object
6
+ */
7
+ declare class UmbDataTypePropertyCollection extends Array<DataTypePropertyPresentationModel> {
8
+ constructor(args?: Array<DataTypePropertyPresentationModel>);
9
+ getValueByAlias<T>(alias: string): T | undefined;
10
+ getByAlias(alias: string): DataTypePropertyPresentationModel | undefined;
11
+ }
12
+
13
+ export { UmbDataTypePropertyCollection };
@@ -1,18 +1,20 @@
1
1
  import { Observable } from 'rxjs';
2
- import { HTMLElementConstructor } from './models';
3
- import { UmbControllerHostInterface } from './controller';
4
- import { UmbContextToken, UmbContextProviderController, UmbContextCallback, UmbContextConsumerController } from './context-api';
5
- import { UmbObserverController } from './observable-api';
2
+ import { HTMLElementConstructor } from '@umbraco-cms/backoffice/extension-api';
3
+ import { UmbControllerHostElement } from '@umbraco-cms/backoffice/controller-api';
4
+ import { UmbContextToken, UmbContextProviderController, UmbContextCallback, UmbContextConsumerController } from '@umbraco-cms/backoffice/context-api';
5
+ import { UmbObserverController } from '@umbraco-cms/backoffice/observable-api';
6
6
 
7
7
  interface ResolvedContexts {
8
8
  [key: string]: any;
9
9
  }
10
- declare class UmbElementMixinInterface extends UmbControllerHostInterface {
11
- observe<T>(source: Observable<T>, callback: (_value: T) => void, unique?: string): UmbObserverController<T>;
10
+ declare class UmbElementMixinInterface extends UmbControllerHostElement {
11
+ observe<T>(source: Observable<T> | {
12
+ asObservable: () => Observable<T>;
13
+ }, callback: (_value: T) => void, unique?: string): UmbObserverController<T>;
12
14
  provideContext<R = unknown>(alias: string | UmbContextToken<R>, instance: R): UmbContextProviderController<R>;
13
15
  consumeContext<R = unknown>(alias: string | UmbContextToken<R>, callback: UmbContextCallback<R>): UmbContextConsumerController<R>;
14
16
  consumeAllContexts(contextAliases: string[], callback: (_instances: ResolvedContexts) => void): void;
15
17
  }
16
- declare const UmbElementMixin: <T extends HTMLElementConstructor<HTMLElement>>(superClass: T) => HTMLElementConstructor<UmbElementMixinInterface> & T;
18
+ declare const UmbElementMixin: <T extends HTMLElementConstructor>(superClass: T) => HTMLElementConstructor<UmbElementMixinInterface> & T;
17
19
 
18
20
  export { UmbElementMixin, UmbElementMixinInterface };
@@ -1,15 +1,16 @@
1
- import { UmbControllerHostInterface } from './controller';
2
- import { UmbEntityActionBase as UmbEntityActionBase$1 } from './entity-action';
1
+ import { UmbControllerHostElement } from '@umbraco-cms/backoffice/controller-api';
2
+ import { UmbEntityActionBase as UmbEntityActionBase$1 } from '@umbraco-cms/backoffice/entity-action';
3
+ import { UmbDetailRepository, UmbItemRepository, UmbFolderRepository } from '@umbraco-cms/backoffice/repository';
3
4
 
4
5
  interface UmbAction<RepositoryType = unknown> {
5
- host: UmbControllerHostInterface;
6
+ host: UmbControllerHostElement;
6
7
  repository: RepositoryType;
7
8
  execute(): Promise<void>;
8
9
  }
9
10
  declare class UmbActionBase<RepositoryType> {
10
- host: UmbControllerHostInterface;
11
+ host: UmbControllerHostElement;
11
12
  repository?: RepositoryType;
12
- constructor(host: UmbControllerHostInterface, repositoryAlias: string);
13
+ constructor(host: UmbControllerHostElement, repositoryAlias: string);
13
14
  }
14
15
 
15
16
  interface UmbEntityAction<RepositoryType> extends UmbAction<RepositoryType> {
@@ -17,7 +18,8 @@ interface UmbEntityAction<RepositoryType> extends UmbAction<RepositoryType> {
17
18
  }
18
19
  declare class UmbEntityActionBase<RepositoryType> extends UmbActionBase<RepositoryType> {
19
20
  unique: string;
20
- constructor(host: UmbControllerHostInterface, repositoryAlias: string, unique: string);
21
+ repositoryAlias: string;
22
+ constructor(host: UmbControllerHostElement, repositoryAlias: string, unique: string);
21
23
  }
22
24
 
23
25
  interface UmbEntityBulkAction<RepositoryType = unknown> extends UmbAction<RepositoryType> {
@@ -26,47 +28,55 @@ interface UmbEntityBulkAction<RepositoryType = unknown> extends UmbAction<Reposi
26
28
  }
27
29
  declare class UmbEntityBulkActionBase<RepositoryType = unknown> extends UmbActionBase<RepositoryType> {
28
30
  selection: Array<string>;
29
- constructor(host: UmbControllerHostInterface, repositoryAlias: string, selection: Array<string>);
31
+ constructor(host: UmbControllerHostElement, repositoryAlias: string, selection: Array<string>);
30
32
  setSelection(selection: Array<string>): void;
31
33
  }
32
34
 
33
35
  declare class UmbCopyEntityAction<T extends {
34
36
  copy(): Promise<void>;
35
37
  }> extends UmbEntityActionBase$1<T> {
36
- constructor(host: UmbControllerHostInterface, repositoryAlias: string, unique: string);
38
+ constructor(host: UmbControllerHostElement, repositoryAlias: string, unique: string);
37
39
  execute(): Promise<void>;
38
40
  }
39
41
 
40
- declare class UmbDeleteEntityAction<T extends {
41
- delete(unique: string): Promise<void>;
42
- requestItems(uniques: Array<string>): any;
43
- }> extends UmbEntityActionBase$1<T> {
42
+ declare class UmbDeleteEntityAction<T extends UmbDetailRepository & UmbItemRepository<any>> extends UmbEntityActionBase$1<T> {
43
+ #private;
44
+ constructor(host: UmbControllerHostElement, repositoryAlias: string, unique: string);
45
+ execute(): Promise<void>;
46
+ }
47
+
48
+ declare class UmbDeleteFolderEntityAction<T extends UmbFolderRepository> extends UmbEntityActionBase$1<T> {
49
+ #private;
50
+ constructor(host: UmbControllerHostElement, repositoryAlias: string, unique: string);
51
+ execute(): Promise<void>;
52
+ }
53
+
54
+ declare class UmbFolderUpdateEntityAction<T extends UmbFolderRepository = UmbFolderRepository> extends UmbEntityActionBase$1<T> {
44
55
  #private;
45
- constructor(host: UmbControllerHostInterface, repositoryAlias: string, unique: string);
56
+ constructor(host: UmbControllerHostElement, repositoryAlias: string, unique: string);
46
57
  execute(): Promise<void>;
47
58
  }
48
59
 
49
60
  declare class UmbMoveEntityAction<T extends {
50
61
  move(): Promise<void>;
51
62
  }> extends UmbEntityActionBase$1<T> {
52
- constructor(host: UmbControllerHostInterface, repositoryAlias: string, unique: string);
63
+ constructor(host: UmbControllerHostElement, repositoryAlias: string, unique: string);
53
64
  execute(): Promise<void>;
54
65
  }
55
66
 
56
67
  declare class UmbSortChildrenOfEntityAction<T extends {
57
68
  sortChildrenOf(): Promise<void>;
58
69
  }> extends UmbEntityActionBase$1<T> {
59
- constructor(host: UmbControllerHostInterface, repositoryAlias: string, unique: string);
70
+ constructor(host: UmbControllerHostElement, repositoryAlias: string, unique: string);
60
71
  execute(): Promise<void>;
61
72
  }
62
73
 
63
- declare class UmbTrashEntityAction<T extends {
74
+ declare class UmbTrashEntityAction<T extends UmbItemRepository<any> & {
64
75
  trash(unique: Array<string>): Promise<void>;
65
- requestTreeItems(uniques: Array<string>): any;
66
76
  }> extends UmbEntityActionBase$1<T> {
67
77
  #private;
68
- constructor(host: UmbControllerHostInterface, repositoryAlias: string, unique: string);
78
+ constructor(host: UmbControllerHostElement, repositoryAlias: string, unique: string);
69
79
  execute(): Promise<void>;
70
80
  }
71
81
 
72
- export { UmbAction, UmbActionBase, UmbCopyEntityAction, UmbDeleteEntityAction, UmbEntityAction, UmbEntityActionBase, UmbEntityBulkAction, UmbEntityBulkActionBase, UmbMoveEntityAction, UmbSortChildrenOfEntityAction, UmbTrashEntityAction };
82
+ export { UmbAction, UmbActionBase, UmbCopyEntityAction, UmbDeleteEntityAction, UmbDeleteFolderEntityAction, UmbEntityAction, UmbEntityActionBase, UmbEntityBulkAction, UmbEntityBulkActionBase, UmbFolderUpdateEntityAction, UmbMoveEntityAction, UmbSortChildrenOfEntityAction, UmbTrashEntityAction };