Merge branch '14603-clone-search-input'
[arvados.git] / src / views-components / context-menu / action-sets / collection-files-action-set.ts
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 import { ContextMenuActionSet } from "~/views-components/context-menu/context-menu-action-set";
6 import { collectionPanelFilesAction, openMultipleFilesRemoveDialog } from "~/store/collection-panel/collection-panel-files/collection-panel-files-actions";
7 import { openCollectionPartialCopyDialog } from '~/store/collections/collection-partial-copy-actions';
8
9 export const collectionFilesActionSet: ContextMenuActionSet = [[{
10     name: "Select all",
11     execute: dispatch => {
12         dispatch(collectionPanelFilesAction.SELECT_ALL_COLLECTION_FILES());
13     }
14 }, {
15     name: "Unselect all",
16     execute: dispatch => {
17         dispatch(collectionPanelFilesAction.UNSELECT_ALL_COLLECTION_FILES());
18     }
19 }, {
20     name: "Remove selected",
21     execute: dispatch => {
22         dispatch(openMultipleFilesRemoveDialog());
23     }
24 }, {
25     name: "Download selected",
26     execute: () => { return; }
27 }, {
28     name: "Create a new collection with selected",
29     execute: dispatch => { 
30         dispatch<any>(openCollectionPartialCopyDialog());
31     }
32 }]];