X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/b323a94f313671b44a066a2f91dea562e9464d10..bccb9ca5151f041d8c8b73098a3e1874023e3efa:/src/store/context-menu/context-menu-actions.ts diff --git a/src/store/context-menu/context-menu-actions.ts b/src/store/context-menu/context-menu-actions.ts index 89d65244..8e5eb1e7 100644 --- a/src/store/context-menu/context-menu-actions.ts +++ b/src/store/context-menu/context-menu-actions.ts @@ -2,14 +2,15 @@ // // SPDX-License-Identifier: AGPL-3.0 -// import { default as unionize, ofType, UnionOf } from "unionize"; +import { default as unionize, ofType, UnionOf } from "unionize"; +import { ContextMenuPosition, ContextMenuResource } from "./context-menu-reducer"; -// const actions = unionize({ -// OPEN_CONTEXT_MENU: ofType<{position: {x: number, y: number}}>() -// }, { -// tag: 'type', -// value: 'payload' -// }); +export const contextMenuActions = unionize({ + OPEN_CONTEXT_MENU: ofType<{ position: ContextMenuPosition, resource: ContextMenuResource }>(), + CLOSE_CONTEXT_MENU: ofType<{}>() +}, { + tag: 'type', + value: 'payload' + }); -// export type ContextMenuAction = UnionOf; -// export default actions; \ No newline at end of file +export type ContextMenuAction = UnionOf;