1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
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, openCollectionPartialCopyToSelectedCollectionDialog } from 'store/collections/collection-partial-copy-actions';
9 // These action sets are used on the multi-select actions button.
10 export const readOnlyCollectionFilesActionSet: ContextMenuActionSet = [[
13 execute: dispatch => {
14 dispatch(collectionPanelFilesAction.SELECT_ALL_COLLECTION_FILES());
19 execute: dispatch => {
20 dispatch(collectionPanelFilesAction.UNSELECT_ALL_COLLECTION_FILES());
24 name: "Create a new collection with selected",
25 execute: dispatch => {
26 dispatch<any>(openCollectionPartialCopyDialog());
30 name: "Copy selected into the collection",
31 execute: dispatch => {
32 dispatch<any>(openCollectionPartialCopyToSelectedCollectionDialog());
37 export const collectionFilesActionSet: ContextMenuActionSet = readOnlyCollectionFilesActionSet.concat([[
39 name: "Remove selected",
40 execute: dispatch => {
41 dispatch(openMultipleFilesRemoveDialog());