Update collection panel actions and reducer to work with updated state structure
[arvados-workbench2.git] / src / store / collection-panel / collection-panel-files / collection-panel-files-actions.ts
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 import { default as unionize, ofType, UnionOf } from "unionize";
6 import { KeepManifest } from "../../../models/keep-manifest";
7
8 export const collectionPanelFilesAction = unionize({
9     SET_COLLECTION_FILES: ofType<{ manifest: KeepManifest }>(),
10     TOGGLE_COLLECTION_FILE_COLLAPSE: ofType<{ id: string }>(),
11     TOGGLE_COLLECTION_FILE_SELECTION: ofType<{ id: string }>(),
12     SELECT_ALL_COLLECTION_FILES: ofType<{}>(),
13     UNSELECT_ALL_COLLECTION_FILES: ofType<{}>(),
14 }, { tag: 'type', value: 'payload' });
15
16 export type CollectionPanelFilesAction = UnionOf<typeof collectionPanelFilesAction>;