91fa2b00f6d8e3f7e9ca2d4d3bbd1a7ffd933966
[arvados-workbench2.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 "../context-menu-action-set";
6 import { collectionPanelFilesAction } from "../../../store/collection-panel/collection-panel-files/collection-panel-files-actions";
7 import { openMultipleFilesRemoveDialog } from "../../file-remove-dialog/multiple-files-remove-dialog";
8 import { createCollectionWithSelected } from "../../create-collection-dialog-with-selected/create-collection-dialog-with-selected";
9
10
11 export const collectionFilesActionSet: ContextMenuActionSet = [[{
12     name: "Select all",
13     execute: (dispatch) => {
14         dispatch(collectionPanelFilesAction.SELECT_ALL_COLLECTION_FILES());
15     }
16 }, {
17     name: "Unselect all",
18     execute: (dispatch) => {
19         dispatch(collectionPanelFilesAction.UNSELECT_ALL_COLLECTION_FILES());
20     }
21 }, {
22     name: "Remove selected",
23     execute: (dispatch, resource) => {
24         dispatch(openMultipleFilesRemoveDialog());
25     }
26 }, {
27     name: "Download selected",
28     execute: (dispatch, resource) => {
29         return;
30     }
31 }, {
32     name: "Create a new collection with selected",
33     execute: (dispatch) => {
34         dispatch<any>(createCollectionWithSelected());
35     }
36 }]];