2023-02-27 14:05:46 +01:00
|
|
|
import { UmbAction, UmbActionBase } from './action';
|
2023-03-29 17:56:39 +02:00
|
|
|
import { UmbControllerHostElement } from '@umbraco-cms/backoffice/controller';
|
2023-02-27 14:05:46 +01:00
|
|
|
|
2023-02-27 20:46:13 +01:00
|
|
|
export interface UmbEntityBulkAction<RepositoryType = unknown> extends UmbAction<RepositoryType> {
|
2023-02-27 14:05:46 +01:00
|
|
|
selection: Array<string>;
|
2023-02-27 20:46:13 +01:00
|
|
|
setSelection(selection: Array<string>): void;
|
2023-02-27 14:05:46 +01:00
|
|
|
}
|
2023-02-27 14:00:02 +01:00
|
|
|
|
2023-02-27 20:46:13 +01:00
|
|
|
export class UmbEntityBulkActionBase<RepositoryType = unknown> extends UmbActionBase<RepositoryType> {
|
2023-02-27 14:00:02 +01:00
|
|
|
selection: Array<string>;
|
|
|
|
|
|
2023-03-29 17:56:39 +02:00
|
|
|
constructor(host: UmbControllerHostElement, repositoryAlias: string, selection: Array<string>) {
|
2023-02-27 14:00:02 +01:00
|
|
|
super(host, repositoryAlias);
|
|
|
|
|
this.selection = selection;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
setSelection(selection: Array<string>) {
|
|
|
|
|
this.selection = selection;
|
|
|
|
|
}
|
|
|
|
|
}
|