Merge remote-tracking branch 'origin/main' into 18207-Workbench2-is-not-clearing...
[arvados-workbench2.git] / src / views-components / context-menu / action-sets / collection-files-action-set.ts
index 885f222cbc02cfac01c7069440e960b81a7763b3..7e08eef0ca14d6bb9e9374843a3d5f7c323e20f2 100644 (file)
@@ -2,37 +2,44 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import { ContextMenuActionSet } from "~/views-components/context-menu/context-menu-action-set";
-import { collectionPanelFilesAction, openMultipleFilesRemoveDialog } from "~/store/collection-panel/collection-panel-files/collection-panel-files-actions";
-import { openCollectionPartialCopyDialog, openCollectionPartialCopyToSelectedCollectionDialog } from '~/store/collections/collection-partial-copy-actions';
-import { DownloadCollectionFileAction } from "~/views-components/context-menu/actions/download-collection-file-action";
+import { ContextMenuActionSet } from "views-components/context-menu/context-menu-action-set";
+import { collectionPanelFilesAction, openMultipleFilesRemoveDialog } from "store/collection-panel/collection-panel-files/collection-panel-files-actions";
+import { openCollectionPartialCopyDialog } from 'store/collections/collection-partial-copy-actions';
 
-export const collectionFilesActionSet: ContextMenuActionSet = [[{
-    name: "Select all",
-    execute: dispatch => {
-        dispatch(collectionPanelFilesAction.SELECT_ALL_COLLECTION_FILES());
-    }
-}, {
-    name: "Unselect all",
-    execute: dispatch => {
-        dispatch(collectionPanelFilesAction.UNSELECT_ALL_COLLECTION_FILES());
-    }
-}, {
-    name: "Remove selected",
-    execute: dispatch => {
-        dispatch(openMultipleFilesRemoveDialog());
-    }
-}, {
-    component: DownloadCollectionFileAction,
-    execute: () => { return; }
-}, {
-    name: "Create a new collection with selected",
-    execute: dispatch => {
-        dispatch<any>(openCollectionPartialCopyDialog());
-    }
-}, {
-    name: "Copy selected into the collection",
-    execute: dispatch => {
-        dispatch<any>(openCollectionPartialCopyToSelectedCollectionDialog());
-    }
-}]];
+// These action sets are used on the multi-select actions button.
+export const readOnlyCollectionFilesActionSet: ContextMenuActionSet = [[
+    {
+        name: "Select all",
+        execute: dispatch => {
+            dispatch(collectionPanelFilesAction.SELECT_ALL_COLLECTION_FILES());
+        }
+    },
+    {
+        name: "Unselect all",
+        execute: dispatch => {
+            dispatch(collectionPanelFilesAction.UNSELECT_ALL_COLLECTION_FILES());
+        }
+    },
+    {
+        name: "Create a new collection with selected",
+        execute: dispatch => {
+            dispatch<any>(openCollectionPartialCopyDialog());
+        }
+    },
+    // Disabled while addressing #18587
+    // {
+    //     name: "Copy selected into the collection",
+    //     execute: dispatch => {
+    //         dispatch<any>(openCollectionPartialCopyToSelectedCollectionDialog());
+    //     }
+    // }
+]];
+
+export const collectionFilesActionSet: ContextMenuActionSet = readOnlyCollectionFilesActionSet.concat([[
+    {
+        name: "Remove selected",
+        execute: dispatch => {
+            dispatch(openMultipleFilesRemoveDialog());
+        }
+    },
+]]);