1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import * as React from 'react';
6 import { Dispatch } from 'redux';
7 import { RootStore, RootState } from '~/store/store';
9 export type RouteListReducer = (startingList: React.ReactElement[]) => React.ReactElement[];
10 export type CategoriesListReducer = (startingList: string[]) => string[];
11 export type NavigateMatcher = (dispatch: Dispatch, getState: () => RootState, uuid: string) => boolean;
12 export type LocationChangeMatcher = (store: RootStore, pathname: string) => boolean;
14 export interface PluginConfig {
15 // Customize the list of possible center panels by adding or removing Route components.
16 centerPanelList: RouteListReducer[];
18 // Customize the list of side panel categories
19 sidePanelCategories: CategoriesListReducer[];
21 // Add to the list of possible dialogs by adding dialog components.
22 dialogs: React.ReactElement[];
24 // Add navigation actions for identifiers
25 navigateToHandlers: NavigateMatcher[];
27 // Add handlers for navigation actions
28 locationChangeHandlers: LocationChangeMatcher[];
30 appBarLeft?: React.ReactElement;
32 appBarMiddle?: React.ReactElement;
34 appBarRight?: React.ReactElement;