Merge branch 'master'
[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 "../context-menu-action-set";
6 import { collectionPanelFilesAction, openMultipleFilesRemoveDialog } from "~/store/collection-panel/collection-panel-files/collection-panel-files-actions";
7 import { openCollectionPartialCopyDialog } from '~/store/collection-panel/collection-panel-files/collection-panel-files-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: (dispatch, resource) => {
27         return;
28     }
29 }, {
30     name: "Create a new collection with selected",
31     execute: (dispatch) => {
32         dispatch<any>(openCollectionPartialCopyDialog());
33     }
34 }]];