1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import { ResourceKind } from "models/resource";
6 import { MultiSelectMenuActionSet} from "views-components/multiselect-toolbar/ms-menu-actions";
7 import { msCollectionActionSet } from "views-components/multiselect-toolbar/ms-collection-action-set";
8 import { msProjectActionSet } from "views-components/multiselect-toolbar/ms-project-action-set";
9 import { msProcessActionSet } from "views-components/multiselect-toolbar/ms-process-action-set";
10 import { msWorkflowActionSet } from "views-components/multiselect-toolbar/ms-workflow-action-set";
11 import { UserDetailsActionSet } from "views-components/multiselect-toolbar/ms-user-details-action-set";
13 export function findActionByName(name: string, actionSet: MultiSelectMenuActionSet) {
14 return actionSet[0].find(action => action.name === name);
17 const { COLLECTION, PROCESS, PROJECT, WORKFLOW, USER } = ResourceKind;
19 export const kindToActionSet: Record<string, MultiSelectMenuActionSet> = {
20 [COLLECTION]: msCollectionActionSet,
21 [PROCESS]: msProcessActionSet,
22 [PROJECT]: msProjectActionSet,
23 [WORKFLOW]: msWorkflowActionSet,
24 [USER]: UserDetailsActionSet,