1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import { default as unionize, ofType, UnionOf } from "unionize";
7 import { TreePickerNode } from "./tree-picker";
9 export const treePickerActions = unionize({
10 LOAD_TREE_PICKER_NODE: ofType<{ nodeId: string, pickerId: string }>(),
11 LOAD_TREE_PICKER_NODE_SUCCESS: ofType<{ nodeId: string, nodes: Array<TreePickerNode>, pickerId: string }>(),
12 TOGGLE_TREE_PICKER_NODE_COLLAPSE: ofType<{ nodeId: string, pickerId: string }>(),
13 TOGGLE_TREE_PICKER_NODE_SELECT: ofType<{ nodeId: string, pickerId: string }>(),
14 RESET_TREE_PICKER: ofType<{ pickerId: string }>()
20 export type TreePickerAction = UnionOf<typeof treePickerActions>;