X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/e63198a93d7b537ffbb68b8210c99f76041fd112..68bcb877244747d3895212bd5b6d8fb228519ce9:/src/store/tree-picker/tree-picker-actions.ts diff --git a/src/store/tree-picker/tree-picker-actions.ts b/src/store/tree-picker/tree-picker-actions.ts index 772d89df..5b04389a 100644 --- a/src/store/tree-picker/tree-picker-actions.ts +++ b/src/store/tree-picker/tree-picker-actions.ts @@ -2,18 +2,17 @@ // // SPDX-License-Identifier: AGPL-3.0 -import { default as unionize, ofType, UnionOf } from "unionize"; -import { TreeNode } from "../../models/tree"; +import { unionize, ofType, UnionOf } from "~/common/unionize"; + import { TreePickerNode } from "./tree-picker"; export const treePickerActions = unionize({ - LOAD_TREE_PICKER_NODE: ofType<{ id: string }>(), - LOAD_TREE_PICKER_NODE_SUCCESS: ofType<{ id: string, nodes: Array }>(), - TOGGLE_TREE_PICKER_NODE_COLLAPSE: ofType<{ id: string }>(), - TOGGLE_TREE_PICKER_NODE_SELECT: ofType<{ id: string }>() -}, { - tag: 'type', - value: 'payload' - }); + LOAD_TREE_PICKER_NODE: ofType<{ nodeId: string, pickerId: string }>(), + LOAD_TREE_PICKER_NODE_SUCCESS: ofType<{ nodeId: string, nodes: Array, pickerId: string }>(), + TOGGLE_TREE_PICKER_NODE_COLLAPSE: ofType<{ nodeId: string, pickerId: string }>(), + TOGGLE_TREE_PICKER_NODE_SELECT: ofType<{ nodeId: string, pickerId: string }>(), + EXPAND_TREE_PICKER_NODES: ofType<{ nodeIds: string[], pickerId: string }>(), + RESET_TREE_PICKER: ofType<{ pickerId: string }>() +}); export type TreePickerAction = UnionOf;