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";
6 import { DataTableFilterItem } from "../../components/data-table-filters/data-table-filters";
7 import { DataColumns } from "../../components/data-table/data-table";
9 const actions = unionize({
10 SET_COLUMNS: ofType<{id: string, columns: DataColumns<any> }>(),
11 SET_FILTERS: ofType<{id: string,columnName: string, filters: DataTableFilterItem[]}>(),
12 SET_ITEMS: ofType<{id: string,items: any[]}>(),
13 SET_PAGE: ofType<{id: string,page: number}>(),
14 SET_ROWS_PER_PAGE: ofType<{id: string,rowsPerPage: number}>(),
15 TOGGLE_COLUMN: ofType<{id: string, columnName: string }>(),
16 TOGGLE_SORT: ofType<{id: string, columnName: string }>(),
17 SET_SEARCH_VALUE: ofType<{id: string,searchValue: string}>()
18 }, { tag: "type", value: "payload" });
20 export type DataExplorerAction = UnionOf<typeof actions>;
22 export default actions;