21128: full set of project actions in place Arvados-DCO-1.1-Signed-off-by: Lisa Knox...
[arvados-workbench2.git] / src / views-components / multiselect-toolbar / ms-menu-action-set.ts
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 import { Dispatch } from "redux";
6 import { IconType } from "components/icon/icon";
7 import { ResourcesState } from "store/resources/resources";
8 import { FavoritesState } from "store/favorites/favorites-reducer";
9 import { ContextMenuResource } from "store/context-menu/context-menu-actions";
10
11 export const MultiSelectMenuActionNames = {
12   ADD_TO_FAVORITES: "Add to Favorites",
13   ADD_TO_TRASH: "Add to Trash",
14   API_DETAILS: 'API Details',
15   COPY_AND_RERUN_PROCESS: "Copy and re-run process",
16   COPY_TO_CLIPBOARD: "Copy to clipboard",
17   EDIT_PPROJECT: 'Edit project',
18   FREEZE_PROJECT: 'Freeze Project',
19   MAKE_A_COPY: "Make a copy",
20   MOVE_TO: "Move to",
21   NEW_PROJECT: 'New project',
22   OPEN_IN_NEW_TAB: 'Open in new tab',
23   OPEN_W_3RD_PARTY_CLIENT: 'Open with 3rd party client',
24   REMOVE: "Remove",
25   SHARE: 'Share',
26   VIEW_DETAILS: 'View details',
27 };
28
29 export type MultiSelectMenuAction = {
30     name: string;
31     icon: IconType;
32     hasAlts: boolean;
33     altName?: string;
34     altIcon?: IconType;
35     isForMulti: boolean;
36     useAlts?: (uuid: string | null, resources: ResourcesState, favorites: FavoritesState) => boolean;
37     execute(dispatch: Dispatch, resources: ContextMenuResource[], state?: any): void;
38     adminOnly?: boolean;
39 };
40
41 export type MultiSelectMenuActionSet = MultiSelectMenuAction[][];