//
// SPDX-License-Identifier: AGPL-3.0
-import { ContextMenuAction, ContextMenuActionSet } from '../context-menu-action-set';
-import { ToggleFavoriteAction } from '../actions/favorite-action';
-import { toggleFavorite } from 'store/favorites/favorites-actions';
+import { ContextMenuAction, ContextMenuActionSet } from "../context-menu-action-set";
+import { ToggleFavoriteAction } from "../actions/favorite-action";
+import { toggleFavorite } from "store/favorites/favorites-actions";
import {
RenameIcon,
ShareIcon,
Link,
RestoreVersionIcon,
FolderSharedIcon,
-} from 'components/icon/icon';
-import { openCollectionUpdateDialog } from 'store/collections/collection-update-actions';
-import { favoritePanelActions } from 'store/favorite-panel/favorite-panel-action';
-import { openMoveCollectionDialog } from 'store/collections/collection-move-actions';
-import { openCollectionCopyDialog } from 'store/collections/collection-copy-actions';
-import { openWebDavS3InfoDialog } from 'store/collections/collection-info-actions';
-import { ToggleTrashAction } from 'views-components/context-menu/actions/trash-action';
-import { toggleCollectionTrashed } from 'store/trash/trash-actions';
-import { openSharingDialog } from 'store/sharing-dialog/sharing-dialog-actions';
-import { openAdvancedTabDialog } from 'store/advanced-tab/advanced-tab';
-import { toggleDetailsPanel } from 'store/details-panel/details-panel-action';
-import { copyToClipboardAction, openInNewTabAction } from 'store/open-in-new-tab/open-in-new-tab.actions';
-import { openRestoreCollectionVersionDialog } from 'store/collections/collection-version-actions';
-import { TogglePublicFavoriteAction } from '../actions/public-favorite-action';
-import { togglePublicFavorite } from 'store/public-favorites/public-favorites-actions';
-import { publicFavoritePanelActions } from 'store/public-favorites-panel/public-favorites-action';
-import { ContextMenuResource } from 'store/context-menu/context-menu-actions';
+} from "components/icon/icon";
+import { openCollectionUpdateDialog } from "store/collections/collection-update-actions";
+import { favoritePanelActions } from "store/favorite-panel/favorite-panel-action";
+import { openMoveCollectionDialog } from "store/collections/collection-move-actions";
+import { openCollectionCopyDialog } from "store/collections/collection-copy-actions";
+import { openWebDavS3InfoDialog } from "store/collections/collection-info-actions";
+import { ToggleTrashAction } from "views-components/context-menu/actions/trash-action";
+import { toggleCollectionTrashed } from "store/trash/trash-actions";
+import { openSharingDialog } from "store/sharing-dialog/sharing-dialog-actions";
+import { openAdvancedTabDialog } from "store/advanced-tab/advanced-tab";
+import { toggleDetailsPanel } from "store/details-panel/details-panel-action";
+import { copyToClipboardAction, openInNewTabAction } from "store/open-in-new-tab/open-in-new-tab.actions";
+import { openRestoreCollectionVersionDialog } from "store/collections/collection-version-actions";
+import { TogglePublicFavoriteAction } from "../actions/public-favorite-action";
+import { togglePublicFavorite } from "store/public-favorites/public-favorites-actions";
+import { publicFavoritePanelActions } from "store/public-favorites-panel/public-favorites-action";
+import { ContextMenuResource } from "store/context-menu/context-menu-actions";
const toggleFavoriteAction: ContextMenuAction = {
component: ToggleFavoriteAction,
- name: 'ToggleFavoriteAction',
+ name: "ToggleFavoriteAction",
execute: (dispatch, resources) => {
- resources.forEach((resource) =>
+ resources.forEach(resource =>
dispatch<any>(toggleFavorite(resource)).then(() => {
dispatch<any>(favoritePanelActions.REQUEST_ITEMS());
})
[
{
icon: OpenIcon,
- name: 'Open in new tab',
+ name: "Open in new tab",
execute: (dispatch, resource) => {
dispatch<any>(openInNewTabAction(resource));
},
},
{
icon: Link,
- name: 'Copy to clipboard',
+ name: "Copy to clipboard",
execute: (dispatch, resource) => {
dispatch<any>(copyToClipboardAction(resource));
},
},
{
icon: CopyIcon,
- name: 'Make a copy',
+ name: "Make a copy",
execute: (dispatch, resources) => {
- resources.forEach((resource) => dispatch<any>(openCollectionCopyDialog(resource)));
+ resources.forEach(resource => dispatch<any>(openCollectionCopyDialog(resource)));
},
},
{
icon: DetailsIcon,
- name: 'View details',
- execute: (dispatch) => {
+ name: "View details",
+ execute: dispatch => {
dispatch<any>(toggleDetailsPanel());
},
},
{
icon: AdvancedIcon,
- name: 'API Details',
+ name: "API Details",
execute: (dispatch, resources) => {
- resources.forEach((resource) => dispatch<any>(openAdvancedTabDialog(resource.uuid)));
+ resources.forEach(resource => dispatch<any>(openAdvancedTabDialog(resource.uuid)));
},
},
],
toggleFavoriteAction,
{
icon: FolderSharedIcon,
- name: 'Open with 3rd party client',
+ name: "Open with 3rd party client",
execute: (dispatch, resources) => {
- resources.forEach((resource) => dispatch<any>(openWebDavS3InfoDialog(resource.uuid)));
+ resources.forEach(resource => dispatch<any>(openWebDavS3InfoDialog(resource.uuid)));
},
},
],
...readOnlyCollectionActionSet.reduce((prev, next) => prev.concat(next), []),
{
icon: RenameIcon,
- name: 'Edit collection',
+ name: "Edit collection",
execute: (dispatch, resources) => {
- resources.forEach((resource) => dispatch<any>(openCollectionUpdateDialog(resource)));
+ resources.forEach(resource => dispatch<any>(openCollectionUpdateDialog(resource)));
},
},
{
icon: ShareIcon,
- name: 'Share',
+ name: "Share",
execute: (dispatch, resources) => {
resources.forEach(({ uuid }) => dispatch<any>(openSharingDialog(uuid)));
},
},
{
icon: MoveToIcon,
- name: 'Move to',
- execute: (dispatch, resources) => resources.forEach((resource) => dispatch<any>(openMoveCollectionDialog(resource))),
+ name: "Move to",
+ execute: (dispatch, resources) => dispatch<any>(openMoveCollectionDialog(resources[0])),
},
{
component: ToggleTrashAction,
- name: 'ToggleTrashAction',
- // execute: (dispatch, resource) => {
+ name: "ToggleTrashAction",
execute: (dispatch, resources: ContextMenuResource[]) => {
- resources.forEach((resource) => dispatch<any>(toggleCollectionTrashed(resource.uuid, resource.isTrashed!!)));
+ resources.forEach(resource => dispatch<any>(toggleCollectionTrashed(resource.uuid, resource.isTrashed!!)));
},
},
],
...collectionActionSet.reduce((prev, next) => prev.concat(next), []),
{
component: TogglePublicFavoriteAction,
- name: 'TogglePublicFavoriteAction',
+ name: "TogglePublicFavoriteAction",
execute: (dispatch, resources) => {
- resources.forEach((resource) =>
+ resources.forEach(resource =>
dispatch<any>(togglePublicFavorite(resource)).then(() => {
dispatch<any>(publicFavoritePanelActions.REQUEST_ITEMS());
})
...commonActionSet.reduce((prev, next) => prev.concat(next), []),
{
icon: RestoreVersionIcon,
- name: 'Restore version',
+ name: "Restore version",
execute: (dispatch, resources) => {
resources.forEach(({ uuid }) => dispatch<any>(openRestoreCollectionVersionDialog(uuid)));
},
//
// SPDX-License-Identifier: AGPL-3.0
-import { ContextMenuActionSet } from '../context-menu-action-set';
-import { ToggleFavoriteAction } from '../actions/favorite-action';
-import { toggleFavorite } from 'store/favorites/favorites-actions';
+import { ContextMenuActionSet } from "../context-menu-action-set";
+import { ToggleFavoriteAction } from "../actions/favorite-action";
+import { toggleFavorite } from "store/favorites/favorites-actions";
import {
RenameIcon,
ShareIcon,
OutputIcon,
AdvancedIcon,
OpenIcon,
-} from 'components/icon/icon';
-import { favoritePanelActions } from 'store/favorite-panel/favorite-panel-action';
-import { openMoveProcessDialog } from 'store/processes/process-move-actions';
-import { openProcessUpdateDialog } from 'store/processes/process-update-actions';
-import { openCopyProcessDialog } from 'store/processes/process-copy-actions';
-import { openSharingDialog } from 'store/sharing-dialog/sharing-dialog-actions';
-import { openRemoveProcessDialog } from 'store/processes/processes-actions';
-import { toggleDetailsPanel } from 'store/details-panel/details-panel-action';
-import { navigateToOutput } from 'store/process-panel/process-panel-actions';
-import { openAdvancedTabDialog } from 'store/advanced-tab/advanced-tab';
-import { TogglePublicFavoriteAction } from '../actions/public-favorite-action';
-import { togglePublicFavorite } from 'store/public-favorites/public-favorites-actions';
-import { publicFavoritePanelActions } from 'store/public-favorites-panel/public-favorites-action';
-import { openInNewTabAction } from 'store/open-in-new-tab/open-in-new-tab.actions';
+} from "components/icon/icon";
+import { favoritePanelActions } from "store/favorite-panel/favorite-panel-action";
+import { openMoveProcessDialog } from "store/processes/process-move-actions";
+import { openProcessUpdateDialog } from "store/processes/process-update-actions";
+import { openCopyProcessDialog } from "store/processes/process-copy-actions";
+import { openSharingDialog } from "store/sharing-dialog/sharing-dialog-actions";
+import { openRemoveProcessDialog } from "store/processes/processes-actions";
+import { toggleDetailsPanel } from "store/details-panel/details-panel-action";
+import { navigateToOutput } from "store/process-panel/process-panel-actions";
+import { openAdvancedTabDialog } from "store/advanced-tab/advanced-tab";
+import { TogglePublicFavoriteAction } from "../actions/public-favorite-action";
+import { togglePublicFavorite } from "store/public-favorites/public-favorites-actions";
+import { publicFavoritePanelActions } from "store/public-favorites-panel/public-favorites-action";
+import { openInNewTabAction } from "store/open-in-new-tab/open-in-new-tab.actions";
export const readOnlyProcessResourceActionSet: ContextMenuActionSet = [
[
{
component: ToggleFavoriteAction,
execute: (dispatch, resources) => {
- resources.forEach((resource) =>
+ resources.forEach(resource =>
dispatch<any>(toggleFavorite(resource)).then(() => {
dispatch<any>(favoritePanelActions.REQUEST_ITEMS());
})
},
{
icon: OpenIcon,
- name: 'Open in new tab',
+ name: "Open in new tab",
execute: (dispatch, resources) => {
- resources.forEach((resource) => dispatch<any>(openInNewTabAction(resource)));
+ resources.forEach(resource => dispatch<any>(openInNewTabAction(resource)));
},
},
{
icon: ReRunProcessIcon,
- name: 'Copy and re-run process',
+ name: "Copy and re-run process",
execute: (dispatch, resources) => {
- resources.forEach((resource) => dispatch<any>(openCopyProcessDialog(resource)));
+ resources.forEach(resource => dispatch<any>(openCopyProcessDialog(resource)));
},
},
{
icon: OutputIcon,
- name: 'Outputs',
+ name: "Outputs",
execute: (dispatch, resources) => {
- resources.forEach((resource) => {
+ resources.forEach(resource => {
if (resource.outputUuid) {
dispatch<any>(navigateToOutput(resource.outputUuid));
}
},
{
icon: DetailsIcon,
- name: 'View details',
- execute: (dispatch) => {
+ name: "View details",
+ execute: dispatch => {
dispatch<any>(toggleDetailsPanel());
},
},
{
icon: AdvancedIcon,
- name: 'API Details',
+ name: "API Details",
execute: (dispatch, resources) => {
- resources.forEach((resource) => dispatch<any>(openAdvancedTabDialog(resource.uuid)));
+ resources.forEach(resource => dispatch<any>(openAdvancedTabDialog(resource.uuid)));
},
},
],
...readOnlyProcessResourceActionSet.reduce((prev, next) => prev.concat(next), []),
{
icon: RenameIcon,
- name: 'Edit process',
+ name: "Edit process",
execute: (dispatch, resources) => {
- resources.forEach((resource) => dispatch<any>(openProcessUpdateDialog(resource)));
+ resources.forEach(resource => dispatch<any>(openProcessUpdateDialog(resource)));
},
},
{
icon: ShareIcon,
- name: 'Share',
+ name: "Share",
execute: (dispatch, resources) => {
resources.forEach(({ uuid }) => dispatch<any>(openSharingDialog(uuid)));
},
},
{
icon: MoveToIcon,
- name: 'Move to',
+ name: "Move to",
execute: (dispatch, resources) => {
- resources.forEach((resource) => dispatch<any>(openMoveProcessDialog(resource)));
+ dispatch<any>(openMoveProcessDialog(resources[0]));
},
},
{
- name: 'Remove',
+ name: "Remove",
icon: RemoveIcon,
execute: (dispatch, resources) => {
- resources.forEach((resource) => dispatch<any>(openRemoveProcessDialog(resource.uuid)));
+ resources.forEach(resource => dispatch<any>(openRemoveProcessDialog(resource.uuid)));
},
},
],
...processResourceActionSet.reduce((prev, next) => prev.concat(next), []),
{
component: TogglePublicFavoriteAction,
- name: 'Add to public favorites',
+ name: "Add to public favorites",
execute: (dispatch, resources) => {
- resources.forEach((resource) =>
+ resources.forEach(resource =>
dispatch<any>(togglePublicFavorite(resource)).then(() => {
dispatch<any>(publicFavoritePanelActions.REQUEST_ITEMS());
})