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